Mariner

667 Reputation

9 Badges

19 years, 258 days

MaplePrimes Activity


These are answers submitted by Mariner

Sorry, I misread your question. The directional derivative can be evaluated at any given point by substituting the value of that point's coordinates in the derivative. For example: restart; with(VectorCalculus): sph := (x-a)^2+(y-b)^2+(z-c)^2-r^2; dd := DirectionalDiff( sph , , [x,y,z] ); v1,v2,v3 := 1,2,3; dd; x,y,z := 4,5,6; dd; a,b,c := 0,0,0; dd; You can, of course, use eval, or subs, if that is more convenient. J. Tarr
The directional derivative will evaluate to a simple numerical answer if the derivatives of the function are constants. For example: restart; f := (a,b,c)->VectorCalculus[DirectionalDiff](2*x+3*y+4*z+1, ,[x, y, z] ): f(1,-2,3); f(4,-5,6); Hope this helps, J. Tarr
Try this: restart; VectorCalculus[DirectionalDiff](x*exp(y)/(3*z^2+1), <1,-2,3>,[x,y,z]); However, if you have several directional derivatives to compute you could do this: restart; f := (a,b,c)->VectorCalculus[DirectionalDiff](x*exp(y)/(3*z^2+1), ,[x, y, z] ): f(1,-2,3); f(4,-5,6); Hope this helps, J. Tarr
Phil, One can ask for the gradient at a point in space (such as the origin 0,0,0), or ask for the directional differential in the direction of a specified vector at a specified point. The question that you ask seems to be a mixture of the two. Please see ?VectorCalculus[DirectionalDiff] and click on the links to the definitions of directional derivative and gradient. Hope this helps, J. Tarr
The MLE calculates one of the sample parameters given the other. This is not made clear in the help page, but as you pointed out one can deduce this from the examples. I have been unable to get a MLE of the standard deviation of a lognormal distribution: it consistently fails with this error message "Error, (in Statistics:-MaximumLikelihoodEstimate) complex value encountered". The input was a RandomVector(100,generator=1. .. 100.), ie positive floating point numbers. The Statistics package in Maple 10 has a number of weaknesses, eg try setting outputoptions to float[8] when obtaining a RandomVector. Hopefully these have rectified in Maple 11. J. Tarr
Dave, It's not too clear what you are trying to do, but assuming that you want the directional differential in the direction of vector <2,-1,0>, perhaps this is what you are looking for: VectorCalculus[DirectionalDiff](x*exp(y)/(3*z^2+1), <2,-1,0>,[x,y,z]); Please see ?VectorCalculus[DirectionalDiff] Hope this helps, J. Tarr
Elinor, You could do this. First create a blank text file, eg cracker.txt, in a convenient directory, eg C:\Project\data, and then close this blank file. Next insert these commands in your worksheet after soln4:= writedata[APPEND]("C:\\Project\\data\\cracker.txt",soln[2,1]); seq(writedata[APPEND]("C:\\Project\\data\\cracker.txt",soln||k[2,1]),k=1..4); Run the worksheet and the two commands above will copy all the soln data to the text file. Then open the text file with Excel using Files of Type Text (*.prn; *txt; *.csv) then click next, next and finish. If you want the headings to the columns (z, F1(z), etc) the easiest way is to type them into the Excel spreadsheet. Good luck with your project, J. Tarr
Elinor, Please see ?writeline and ?writedata. You may have to change the format in which the ODE solutions are written to file for import into Excel If you need more help, please upload your worksheet. Hope this helps, J. Tarr
Please see example 3.12 at ?sum. Regards, J. Tarr
Stefan, You might find these plots interesting: plot(exp(-9/10*x)*MathieuS(-81/100,-43.19082058, x),x=-1.8..2.23,title="g(x,N) with N=-43.19082058") ; plot(exp(-9/10*x)*MathieuS(-81/100, -61.29907087, x),x=-1.35..1.6,title="g(N,x) with N=-61.29907087"); Good luck with your project, J. Tarr
Stefan, The damping term, exp(-9*x/10) controls the maximum and minimum value of u(x). If you want to find the value of N (=q) that make |u(x)| less than 20, you could do something like this: g:=(x,N)->exp(-9/10*x)*MathieuS(-81/100, N, x); soln := solve(exp(9./10*x)<=20,{x}); x := op([1,2],soln); fsolve(g(x,N)=20,{N}); fsolve(g(x,N)=-20,{N},N=-61.3..-61.2); # interval guessed from trial values of g(x,N) I don't know whether the answers make any sense in the physics of the problem. Hope this helps, J. Tarr
Your problem seems to be over-defined, but perhaps this is what you are looking for: restart; with(geometry): _EnvHorizontalName := x: _EnvVerticalName := y: point(O1,1,-1), point(A,-4,-9); rad := distance(O1,A); circle(MyCircle,[O1,rad]); detail(MyCircle); Good luck, J. Tarr
Stefan, Could you please give more details of your problem, perhaps by uploading your worksheet to MaplePrimes? Regards, J. Tarr
You could try Statistics[PolynomialFit], that does all the work for you :-) Good luck, J. Tarr
Clyde, Try something like this: restart; x := 0; y := 0; for i from 1 to 5 do x := x + i: y := x + 3*x^2: z := y + 2: end do; Hope this helps, J. Tarr
First 13 14 15 16 17 18 19 Last Page 15 of 23