mm-819 === Subject: terminate the NestWhile NestWhile repeats calculations until test is no longer True. Sometimes it happens that it takes a lot of time. How can I terminate calculations if they last more than the certain amount of time or more than certain number of iterations? === Subject: elasticity I have ordered a new book called Continuum Mechanics using Mathematica see here http://www.amazon.com/Continuum-Mechanics-using-Mathematica-Fundamentals/dp/ 0817632409/sr=8-2/qid=1166756429/ref=sr_1_2/104-4481998-2595958?ie=UTF8&s=boo ks Does anyone know related applocations of Mathematica in the field of the Mathematical Theory of Elasticity (and its brances such us elastostatics, elastodynamics, fracture mechanics etc.) In particular I am interested in the simulation of propagation of elastic waves in unbounded and unbounded media (longitudinal, transverse, Rayleigh, Stoneley, torsional waves and so on). Dimitris === Subject: integrate Integrate[(BesselJ[0, x]*Log[x])/Sqrt[1 + x^2], {x, 1, Infinity}] Integrate[(BesselJ[0, x]*Log[x])/Sqrt[1 + x^2], {x, 1, Infinity}] NIntegrate[(BesselJ[0, x]*Log[x])/Sqrt[1 + x^2], {x, 1, Infinity}, Method -> Oscillatory] -0.06630573213061997 Integrate[(BesselK[0, x]*BesselY[1, x])/Sqrt[1 + x^2], {x, 1, Infinity}] Integrate[(BesselK[0, x]*BesselY[1, x])/Sqrt[1 + x^2], {x, 1, Infinity}] NIntegrate[(BesselK[0, x]*BesselY[1, x])/Sqrt[1 + x^2], {x, 1, Infinity}] -0.06586252709607003 -------> Any possibility to get closed form results within Mathematica? Integrate[Sqrt[x^2 + 1]/Sqrt[1 + x^6], {x, 0, 10}] (-(-1)^(1/6))*EllipticF[I*ArcSinh[10*(-1)^(1/3)], (-1)^(2/3)] N[%] -0.10016641038463325 - 1.6857503548125956*I NIntegrate[Sqrt[x^2 + 1]/Sqrt[1 + x^6], {x, 0, 10}] 2.056349237110889 --------> Any ideas to help Mathematica to give a correct answer? Dimitris === Subject: mapping a notation How do I map a notation? Let's say I have something like: Notation[ {{A__}} <--> Parantheses[A__] ] X=Q+W+E; Map[Patantheses, X] That doesn't work. Could you help me please? Nadir === Subject: Re: REPOSTING: PowerTower extended to real exponents I have uploaded a new version of my notebook PowerTower.nb, download from http://web.telia.com/~u31815170/Mathematica/ Since the last version, I have changed horse function to (Exp[x] - 1), to avoid oscillating functions when x->+Infinity This means slightly changed values of the constants I have calculated. I have also included some theory and some graphs in this file, and have structured it better. Thus the new value of Pi to the hyper power e (or Pi tetrated to e) is 1921616.48318907465 There is an ongoing discussion at sci.math.research (Tetration extended to real exponents) about this. Ingolf Dahl === Subject: Bug or feature ? Please, try this with Mathematica (5.2): << Graphics`Graphics` PolarPlot[Sin[t]^2 Cos[t]^2, {t, 0, 2Pi}] PolarPlot[Sin[t]^2 Cos[t]^2, {t, 0, 21}] compare the two graphics. In the second (t is between zero and twentyone) I got a spurios segment between 3rd and 4th quadrants. Can you tell me why ? (Btw, I got this just playing for one minute or two with PolarPlot. The 21 was a typo...) g. === Subject: Tabling So I am having a problem running a Table[Table[,{}],{}]. It's just giving the findings of the first table and printing it however many times I tell the Second table. Any ideas how to get first table to rerun so i can get different vaules in the second table. === Subject: RootSearch Performance About a week ago we had the thread: FindRoot anomoly (example from Mathematica -------------------------------------------------------------- Ersek's RootSearch function finds only seven roots to the equation between x == 1 and x == 100: (* Rules for seven roots, all between 1 and 20 were returned. *) --------------------------------- Then Carl Woll (of Wolfram Research) replied: An alternative method is possible using IntervalBisection: < snip > The nice thing about IntervalBisection is that we were able to use an initial range of {0,Infinity} instead of {1,100}. The other nice thing about IntervalBisection is that we are guaranteed that all roots lie in the interval given in the result, something that is not true with RootSearch. The price you pay is that the only transcendental functions allowed in the input are trigonometric/exponential functions and their inverses, i.e., only functions which support Interval arguments. for a root outside the range specified in the input. While RootSearch has many lines of code, the ideas I use to limit the range being searched are straight forward. I doubt you can find an example where it returns a root outside the specified range. However, if you can find an example that shows otherwise, I would like to know about it. Ted Ersek Reply to: Ted.Ersek@navy.mil === Subject: Re: Generating systems of constraints assuming your variables named a[1],a[2], a[3] .. than define SetAttributes[b, Orderless] MakeConstrains[n_Integer] := With[{vNo = n}, Block[{var, constrain}, var = Table[a[i], {i, 1, vNo}]; constrain = Union[Flatten[Outer[b[#1, #2] &, var, var]] /. b[v1_, v1_] :> Sequence[]] /. b -> NotEqual; constrain = Join[constrain, 0 <= # <= vNo & /@ var]; And @@ constrain ] ] and MakeConstrains[120000] will construct the conditions for 120000 variables. Jens > Good day! I was hoping someone might be able to point me in the > right direction with a problem I ran into. I'm trying to solve an > arbitrarily large system of linear, Diophantine equations whose > solutions are subject to two constraints > 1) All the variables are distinct; i.e., none of the variables are > equal to one another. > 2) All of the variables are bounded by 1 <= x <= # of variables. > > So in essence, I have a system of equations with N variables that I > would like to generate solutions for by assigning {1,2...,N} to each > variable. > > Now, I know that I can use Reduce to solve this system; however, I > don't know how to generate constraints like this for a given N, and > I'd rather not type them all out. Does anyone have any suggestions? > I don't need to do this for very many systems, but more than four, so > I don't want to have to do too much of it manually. > > > Gratefully, > a. > > > === Subject: Re: nestled plotting and Plot[ Evaluate[Table[Normal[Series[Sin[x], {x, 0, i}]], {i, 5}]], {x, -15, 15}] does not help ?? Jens > Hi > I'm having this problem. I want to plot a number of maclaurin > polynomials and I want to do it like this: > Plot[Table[Normal[Series[Sin[x], {x, 0, i}]], {i, 5}], {x, -15, 15}] > This gives me a bunch of error messages. However, if I first print the > table: > Table[Normal[Series[Sin[x], {x, 0, i}]], {i, 5}] > and cut and pase this into the plot command, everything works just as I > want it. How do I get past the cut and paste step? > > /Hadoque > === Subject: Re: nestled plotting Hello All you have to do is to insert Evaluate in front of the Table command: e.g. Plot[Evaluate@Table[Normal[Series[Sin[x], {x, 0, i}]], {i, 5}], {x, -15, 15}]; Norbert Marxer www.mec.li > Hi > I'm having this problem. I want to plot a number of maclaurin > polynomials and I want to do it like this: > Plot[Table[Normal[Series[Sin[x], {x, 0, i}]], {i, 5}], {x, -15, 15}] > This gives me a bunch of error messages. However, if I first print the > table: > Table[Normal[Series[Sin[x], {x, 0, i}]], {i, 5}] > and cut and pase this into the plot command, everything works just as I > want it. How do I get past the cut and paste step? > > /Hadoque === Subject: Re: nestled plotting Use Evaluate In[7]:= Plot[Evaluate[Table[Normal[Series[Sin[x], {x, 0, i}]], {i, 5}]], {x, -15, 15}, Frame -> {True, True, False, False}, Axes -> False, FrameLabel -> {x, }]; Plot has the Attribute HoldAll. As Help Browser mentions if Plot is used to plot a list of functions, that list should appear explicitly as the first argument in Plot or should be introduced using Evaluate or other means. In[8]:= Attributes[Plot] Out[8]= {HoldAll, Protected} The same holds true for e.g. NIntegrate In[10]:= NIntegrate[Evaluate[Table[Normal[Series[Sin[x], {x, 0, i}]], {i, 5}]], {x, -2, 10}] Out[10]= {48., 48., -368.0000000000001, -368.0000000000001, 1020.8000000000009} In[12]:= Attributes[NIntegrate] Out[12]= {HoldAll, Protected} But e.g. In[1]:= Integrate[Table[Normal[Series[Sin[x], {x, 0, i}]], {i, 5}], {x, -2, 10}] Out[1]= {48, 48, -368, -368, 5104/5} In[2]:= Attributes[Integrate] Out[2]= {Protected, ReadProtected} > Hi > I'm having this problem. I want to plot a number of maclaurin > polynomials and I want to do it like this: > Plot[Table[Normal[Series[Sin[x], {x, 0, i}]], {i, 5}], {x, -15, 15}] > This gives me a bunch of error messages. However, if I first print the > table: > Table[Normal[Series[Sin[x], {x, 0, i}]], {i, 5}] > and cut and pase this into the plot command, everything works just as I > want it. How do I get past the cut and paste step? > > /Hadoque === Subject: Re: nestled plotting > Hi > I'm having this problem. I want to plot a number of maclaurin > polynomials and I want to do it like this: > Plot[Table[Normal[Series[Sin[x], {x, 0, i}]], {i, 5}], {x, -15, 15}] > This gives me a bunch of error messages. However, if I first print the > table: > Table[Normal[Series[Sin[x], {x, 0, i}]], {i, 5}] > and cut and pase this into the plot command, everything works just as I > want it. How do I get past the cut and paste step? > > /Hadoque > Wrap the Table expression within an Evaluate [1] function as in Plot[Evaluate[Table[Normal[Series[Sin[x], {x, 0, i}]], {i, 5}]], {x, -15, 15}]; Jean-Marc 1. http://documents.wolfram.com/mathematica/functions/Evaluate === Subject: Re: Help !! plot roots of an expression No proper help can be given without seeing your polynomial! Dimitris > I have a polynomial. A simple example is like this (w-w1) (w + 2 q +en^2 + s w^3) + r > The actual example is more complicated. It is a function of several > variables e.g. q, en, s, r etc.. > I also need to Collect & FullSimplify this expression. > Finally, from that result, I want to plot the roots of this polynomial > (imaginary & real part) vs. q (say) or vs en etc.. other variables can > be given fixed values. > > I'll the thankful if you give me hints how to do this!! === Subject: Re: message question The situation becomes more difficult; when I try to save a file I get: Part of the path C:Documents and SettingsD.S. Anagnostou?p?f??e?a e??as?a? does not exist. Unable to save file C:Documents and SettingsD.S. Anagnostou?p?f??e?a e??as?a?Untitled-1.nb. I try to unistall Mathematica but the Unistall wizard fails! Any help will be greatly appreciate. Merry Christmas!!! > I try to open some existing files and I get this error message... Mathematica was unable to open the file C:Documents and SettingsD.S. > Anagnostou?p?f??e?a e??as?a?Untitled-1.nb. You may have a problem > with your disk, or if you are using a fileserver, someone else may be > using the file. Error code = -43. > > Any ideas what is going here? > > Dimitris