tomleslie

13876 Reputation

20 Badges

15 years, 168 days

MaplePrimes Activity


These are answers submitted by tomleslie

Just because alternatives are good

Assuming that you are using a parametric definition for your 3D curves, then you can use piecewise() definitions for some/all of the components, followed by a single plot:-spacecurve() command.

So an alternative approach for Kitonum's example would be as shown in the attached. NB, many variations on this theme are possiblle!

curve3D.mw

  1. I can't run this in Maple 14, becuase I don't have a version that old
  2. Not sure what you mean by "using DTM and VIM with Pade Approximation" so I ignored this requirement and just used Maple's built-in numeric solvers
  3. Defined as a BVP, everthing *seems* to work provided I define 'infinity' to be around 6 or so
  4. I can get a little further by using the BVP results to convert your problem to an IVP, but this too fails with a singularity around x=7.333

See attached

odeProb.mw

The 'range' argument for odeplot() must come before any optional arguments (eg color)

Also since your boundary conditions are defined at 0 and 1, you will only be able to plot between these points. ie eta=0..1. If you use eta=-1..1, then Maple will issue a warning, and plot from 0 to 1 anyway.

See attached

oodeProb.mw

  1. Define a function which returns a floating point value corresponding to the Bessel function of the first kind and zeroth order, for the supplied argument
  2. Define a function which does not evaluate to a float, but which Maple 'recognises' as a Bessel function of the first kind and zeroth order. The return value of this function can subsequently be evaluated to a float

Both approaches are shown in the attached

myBessel.mw

As the error message suggests, changing the solution command to

sol := TWSolutions(Sys, [f(xi), g(xi), h(xi)])

will generate three "solutions" - none of which are actually functions of xi, and all of whihc are confirmed as' solutions' using pdetest()

Reason for this probably that (according to the TWSolutions help page)

The TWSolutions command computes Traveling Wave Solutions (TWS) for autonomous partial differential equations (PDE) that are rational and nonlinear in the unknowns and their derivatives. An autonomous system is one where the independent variables do not appear explicitly, only through the unknown functions and their derivatives.

Your system is not autonomous since the variable 'xi' explicily appears in all three equations in sys

 

Since you do not post any code specifying f(x,a) or g(x,a), then I cannot explicitly solve solve your problem. However the attached 'toy' example shows the basic process whihc I think(???) yu are trying to achieve. It

  1. defines two function f(x,y) and g(x,y), where 'x' is  assumed to be a variable and 'y' a 'parameter'
  2. specifies a specifc value for the parameter 'y'
  3. computes the roots of the function (f(x,y) for the given value of the parameter 'y'
  4. evaluates g(x,y) for the same value of the parameter 'y', with x-values being the roots computed in step (3) above.
  5. returns the maximum value of g(x,y), where 'x' is one of the roots of f() as computed in step (3)  above, and y is the parameter value defined at step (2) above

roots.mw

The attached work sheet takes an example from the NLPsolve help page, and solves it using 'algebraic' expressions for the objective function and constraints.

The same problem is then solved using 'procedure' inputs for the objective function and constraints.

The same problem is then solved using 'operator' inputs for the objective function and constraints.

One of these must cover the situation you want - otherwise you will have to post the code for your problem

NLPSyntax.mw

The Maclaurin series of a an expression is simply the Taylor series, expanded about zero, which can be achived with the taylor() command. So just check out the help page for taylor

Well I had some problems when the new MaplePrimes interface arrived but everything seems to be working (for me) now. Basic process I use

  1. Click the big green up-arrow in the MaplePrimes editor toolbar. This will produce a popup window
  2. Click the 'Browse' button, which shoud allow you to select a file
  3. Click the 'Upload' button in the popup
  4. The popup then provides a choice between 'Insert Link' and 'Insert Contents'. I only ever use 'Insert Link'. If you click the 'Insert Link' button, then a link to your file should appear in your post
  5. Then click 'OK' in the popup
  6. If tis process doesn't work then I recommend you clear the cache in your browser, restart it, and try again

The following is somewhat lengthier than VV's solution, but is considerably quicker, mainly because it reduces the number of sin(x)/x evalutions

sincMat.mw

Standard way to solve this problem is with fsolve(). Most of the commands in the Student[NumericalAnalysis] package (including Newton), only handle single expressions, not systems of equations.

The attached shows one solution

numAn.mw

The attached worksheet has three execution groups, one of which may address your problem

  1. The first execution group just plots the solution of  the differential equation deL, for a range of values of D(theta)(0) - just so that one can see when the solution 'overshoots' the value theta=0. It si pretty office that this overshoot only occurs for D(theta)(0) < -9 (approximately
  2. The second execution group determine the maximum value of D(theta)(0) for which the solutioon of the ODE reaches the value theta=-0.1.
  3. The third execution group uses the output of (2) above to plot the complete solution for this value of initial velocity. The output plot is "zoomed" to the area around theta=-01, so that one can visually check that this value is attained

I could probably tidy up this worksheet quite a lot, but since I don't know whether or not I am actually doing anything useful, I'll skip such niceties

odeProb.mw

Using Christopher's diagram, it is trivial to see that

sin( theta/2 )=(a/2)/R # that't just 'opposite/hypotenuse'

so theta=2*arcsin(a/(2*R))

so the arc length is R*2*arcsin(a/(2*R))

so the projected area is 2*R*h*arcsin( a/(2*R) ), where 'h' is the other dimension of the rectangle

The 'shoot' package is not a part of standard Maple.

If the standard Maple command dsolve(ODEsys, numeric) provdes solutions, why would I want to use a shoot() method. I haven't got anything against shooting methods, just curious as to why I would bother with an add-on package when the Maple's in-built dsolve() command provides the required solution. I guess I could see it from a pedagogic standpoint, but I can't really believe that one i goingto learn much from issuing the command

shoot( odeSYS, numeric)

rather than

dsolve(odeSYS, numeric).

The attached shows the solution to your problem, with a graph of all the functions in your ODE system, obtained using dsolve(ODEsys, numeric). What else do you want/need

odeSol.mw

You don't say how you are running this test (no code!), but Matalb will use hardawre floating point arithmetic by default ..... and Maple won't.

Try defining the matrices using

Matrix(100,100,(i,j)->rand(), datatype=float[8])

and run the test again

First 178 179 180 181 182 183 184 Last Page 180 of 207