6252 Reputation

17 Badges

10 years, 110 days

MaplePrimes Activity

These are answers submitted by tomleslie


to get a set of solutions. Never a good idea to use isolve() on an equation containing floats

You can obtain a solution using

pdsolve(eq1, explicit);

However you will need three intial/boundary conditions in order to eliminate the three arbitrary constants which arise.

Can't think of any way to do this without introducing a 'tolerance' parameter.

if one sets a tolerance variable,, then one can check whether var-tol < value < var+tol fairly easily using a function such as

comp:= (var, val, tol)-> evalb( var > val-tol)
                                      evalb( var < val+tol);

Using this function, comp( 3.14, Pi, 0.01) returns 'true', but comp( 3.14, Pi, 0.001) returns 'false' - as you would expect.

Only way I could solve this was by increasing both maxmesh and abserr. The former is no problem (just increases compute time): the latter is less desirable, since it means that numerical accuracy may have been 'compromised' somewhat.

It may be possible to use the solution obtained in the attached as argument for the 'approxsoln' option, and thu obtain a more accurate(?) answer, but I haven't bothered trying this

I have no idea what most of the attached worksheet is trying to achieve, and am reasonably certain that most of it is logically rubbish - See the comments I have made in the attached file

If I ignore all of your code, apart from the comment which identifies the ODE you are trying to solve, then I can produce something close to the answer you seem to expect. Since you are incapable of even specifying values for both of the necessary boundary conditions, I think getting this far is miraculous

Not exactly obvious what you want the final plot to look like! The attached shows a couple of possibilities, nd therre are probably many other ways to achieve this.

For the supplied example (ie M=4, so desired variables are A[1], A[2]), the equation system is inconsistent.

A[1] and A[2] occur in the coefficients for x^1, x^2, and x^3. One can solve for A[1], A[2] using any two of these coefficient equations, but there are no values of A[1], A[2] which satisfy all three (without imposing restriction on other parameters)

See attached

Why not use the plots:-pointplot() command and then just give it a list of points to plot?

As in

xVals:=Array( [seq(j, j=0..100,2)]):
yVals:=Array( [seq( j*sin(j), j in xVals)]):
pts:= [seq( [xVals[j],yVals[j]], j=1..numelems(xVals))]:
plots:-pointplot( pts );


The attached produces two values of 'r' for which P(r)=0

I agree with Markiyan that the problem is ill-posed because of the parametric values involved. This makes finding solutions unnecessarily difficult - and unstable numerically. Note, for example, that Maple thinks the solution to your ODE is complex - I assume you believe that it is stricly real??

then the attached worksheet ought to provide what you want

Quick Tip:

if you want to select a complete row or column from a Matrix, then you don't need the 1..rowdim (or 1..coldim) argument: for example
A[..,3] will select all entries in column 3
A[3,..] will select all entries in row 3

Suppose you want to plot the function f - as in

plot(f, 0..10);

Then plotting it "upside-down" can be achieved by using the value=label construct of the tickmarks plot option, together with multiplying the function by (-1), as in

tVals:=[-100, -66, -33, 0]:
tLis:= [seq(j=convert(abs(j), string), j in tVals)]:
plot(-f, 0..10, axis[2]=[tickmarks=tLis]);

The drawback of this approach is that you have to "know/guess" the values of the tickmarks.

I am reasonably sure that one could automate this if necessary: eg if the x-range of the plot is known, then max and min values of the function can be calculated. Then a suitable range for y-axis tickmarks, can be computed which can then be translated to the appropriate labels

Your equation requires three boundary conditions, but only two can be 'boundary' rather than 'initial-value' conditions. I managed to obtain a solution by converting your problem to something which looks a bit like a shooting method. See the attached

The logical process is not obvious but can be summarised as

  1. Guess a value of the derivative D(F)(-1)
  2. Solve the ODE in the range eta=-1..0, using the BCS F(-1)=0, F(0)=0 and the guess mentioned above
  3. From this solution, obtain the associated second derivative at F(-1)
  4. Now solve the same equation using F(-1)=0, the first derivative mentioned bullet 1 above, and the second derivative obtained at step 3.
  5. Since this is now an initial-value problem, the range of the solution can be extended to -1..1, and hence F(1) can be computed
  6. Use an optimisation process to change the value 'guessed' at bullet 1 above, so that the vlaue of F(1) obtained at bullet 5 above is equal to zero
  7. The situation has now been converted to an initial value problem where the bondary conditions are F(-1), together with first and second derivatives at eta=-1. (Rather like using a shooting method to convert a BVP problem to an IVP one.)
  8. Generate a complete solution for this case, and check that the OP's original conditions at F(0) and F(1) are still met

Looks suspiciously like the previous post

where you ignored the suggestions provided. Why?

The attached provides solutions for the provided bcs.

I have deleted pi=3.143, and used Pi=3.14159..... throughout.

'refresh' - what is that? - I have replaced with restart

Rather obviously, your equations are singular at r=0, so I have had to use a mid-point solution method.

Probably because of this singularity, and the combination of huge (10^35) and tiny (10^-20) coefficients in your problem, I have also had to adjust various accuracy settings in order to get an solution at all.

  1. What is the file extension on the the document you are trying to open?
  2. What is the actual format of the document you are trying to open

Anything with a '.mw' or '.mws' extension, Maple will open as a worksheet without giving the dialogue you poted in your question.

If the file has a '.txt' extension, then Maple produce the above dialogue - assuming that it actually contains 'plain text', then use the 'plain text' button on the dialogue, and Maple will import it as plain text

If you have some other combination, then you are going to have to provide more details. Alternatively you could upload the offending file here (use the big green up-arrow in the toolbar), and someone here can probably

  1. figure out what kind of document you have
  2. suggest the best way to persuade Maple to 'open' it
First 101 102 103 104 105 106 107 Last Page 103 of 132