tomleslie

13876 Reputation

20 Badges

15 years, 164 days

MaplePrimes Activity


These are answers submitted by tomleslie

I got a slightly different error when executing yur worksheet: may be a Maple version issue, I'm using Maple2016.1.

There may be a syntax problem in the final term of Eq2, where you have

.......Pr*Q*(theta(eta), eta) = 0

I can't work out what you intended here. If I change it to

.......Pr*Q*theta(eta) = 0

then everything seems to work OK -  at least procedures are returned to enable the solution of res[1..6], although I haven't actually tried using these.

Suggest you check the final term on the lhs of Eq2 very carefully

Well Carl is probably right on the compatiblity issues, but I got nowhere using NLPSolve() - just different error messages which didn't mean much.

However DirectSearch[Search] does return an answer, and in fact returns the *same* answer, from a variety of different start points (which is always a good sign)

One significant(?) change I made to the "structure" of the problem was to use the OP's constraints to reduce/redefine the variables of the problem. For example the constraint x1+x2=1, just means that x2=1-x1. So I changed the procedure so that it only had three parameters xa, xb, xc, and redefined the matrix P using these, along with 1-xa, 1-xb, 1-xc. The only constraints I then used were that xa, xb, xc were all in the range 0..1.

Attached worksheet runs on Maple 2016.1 and returns the answer 3.19854061318404, for the values

xa=.469703555747467 (x1=xa, x2=1-xa)

xb=.517350615396535 (x3=xb, x4=1-xb)

xc= .404376109335478 (x5=xc, x6=1-xc)

optimSol.mw

 

 

Assuming a "toy" worksheet, which assigns/saves a few random expression/variables as in

P:=(x-2)^2-4;
MyVar1:=fsolve(P);
MyVar2:=sqrt(2.0):
MyVar3:=x^2/(x-1);
save MyVar1, MyVar2, MyVar3, "D:/Users/TomLeslie/myMaple/testSave.m";

then, in a new Maple session,

read "D:/Users/TomLeslie/myMaple/testSave.m";
anames( 'user' );

will return the names of any/all assigned variables. Similarly

eval(anames( 'user' ));

will return the corresponding values of the assigned names.

Two points

  1. In the above you will (obviously!) have to adjust the pathNames for the relevant files
  2. I am somewhat surprised that after executing the 'read' statement in the above, the "variables palette" is still empty!!!???

 

p2:=plot(subs(MinSol[2],Model),x=0..1.5):
plots[display]([fig1, p2]);

You might want to consider playing with the symbolSize/color options on fig1, just to make the points more obvious.

evalf(int(ln(z)^6/(1+z^3), z=0..infinity));

returns 725.5729630 - so what exactly is the problem?

 

as in


1*Unit(m)+d*Unit(m)=2*Unit(m);

Before applying numerical solution methods (I mean why bother?), one can show that the supplied PDE is inconsistent with the supplied boundary conditions. See attached

pdeProb.mw

 

Consider the value of the integran at the lower limit (u=1) - it is infinite. Still think this integral can solved for arbitrary n?

By the way - is this a typo, lousy cut-and-paste, double integral, whatever - why does 'du' occur twice?

Given the pde

eqn:=0.3846153846*(diff(F(x, y), y, y))+diff(F(x, y), x)-(diff(w(x), x, x))*y-(1/2)*(int(diff(F(x, y), x), y = -1 .. 1))
        +diff(F(x, y), x, x)-(diff(w(x), x, x, x))*y-(1/2)*(int(diff(F(x, y), x, x), y = -1 .. 1));

the command

sol:=pdsolve(eqn, F(x,y));

will produce the "solution"

sol:= F(x, y) = (diff(w(x), x))*y-_C1*y/exp(x)-(1923076923/5000000000)*_c[2]*x*y+_C2*y+
                       (1/6)*_c[2]*y^3+_C4*y+_F1(x)

In this expression _C1, _c[2], _C2, and _C4 are arbitrary numeric constants: not functions of anything. There are a couple of "interesting" aspects to this equation:

  1. The existence of the sub-expression _C2*y+_C4*y: since both _C2 and _C4 are arbitrary and numeric, then they can be combined into _C3*y: why didn't Maple do this - don't really know
  2. The existence of the "indexed" arbitrary constant _c[2]: why is this an "indexed" constant? - particularly given that there is no _c[1] or _c[3]. I haven't seen an indexed constant returned by a call to pdsolve() before: and I have no idea why it is occurring in this case

You should laso be aware that the last term _F1(x) represents an arbitrary function of 'x'. preceding terms in the solution are functions of 'y', (or 'x' and 'y'), but the existence of _F1(x), means that any function of 'x' alone *ought* to be OK

Tidying the given solution, means that

sol:=F(x, y) = (diff(w(x), x))*y-_C1*y/exp(x)-(1923076923/5000000000)*_C2*x*y+_C3*y+
               (1/6)*_C2*y^3+_F1(x)

ought to be a valid solution: and in fact checking this with

pdetest(sol, eqn);

confirms, that the "tidied" version of the solution is still a solution.

I have laso tried the tidied version when substituting various functions for _F1(x), and pdetest() confrims that each of these is a solution (NB, I only tried functions which were continous, and differentiable)

Overall a very interesting PDE - idle curiousity: does it arise as a result of some "physical, real world" type of problem, or is more or less an "exercise in mathematics"?

Do you just want the parametric plot?

If you do then checkthe help at ?Parametric Plots. The simple command

plot( [2*t*(3*t^4+50*t^2-33)/(t^2+1)^3,
         2*(7*t^6-60*t^4+15*t^2+2)/(t^2+1)^3,
         t=-100..100
       ]
     );

would appear to produce the plot you want.

If you want the corresponding space curve, you could use

plots:-spacecurve( [ 2*t*(3*t^4+50*t^2-33)/(t^2+1)^3,
                                  2*(7*t^6-60*t^4+15*t^2+2)/(t^2+1)^3,
                                  t
                                ],

                                t=-100..100
                             );


 

depending exactly on what you want the result to look like.

Try playing with the following

restart;
g := proc(z)
               local w;
               w := Re(z)*exp(Im(z)*I);
               return 1/(1-z);
       end proc:
changecoords(plots:-complexplot3d(g, 0..1+2*Pi*I, axes=boxed), cylindrical);

 

As the expression is written, the existence of the multiplying factor cos(x)*exp(-t) means that the expression is zero whenever cos(x)=0. Given that x=0..2, this will be true whenever x=Pi/2.

In a similar fashion, the integral in the numerator will return 125*sin(L), which will therefore be unconditionally zero whenever L=An_Integer*Pi - and hence the whole expression wiil be zero

Having considered the above carefully - when you ask "how can i find the lambda " - do you mean pairs of lambda[1], lambda[2]. As written, lambda is an indexed variable in your expression - is this intentional?

So far as I know there is are such concepts in Maple as "text mode" or "math mode".

There are however two choices called "Document Mode" and "Worksheet Mode"

So far as I am aware

  1. if you select "Document Mode" then 2-D Math Input is mandatory
  2. if you select "Worksheet mode" then you have the choice of 1-D or 2-D Math Input

Now I'm strictly a "worksheet mode", with "1-D math input" kind of guy, cos I (personally) find this most convenient,

However you can *play* with these settings using

Tools->Options->Display->Input Display

and

Tools->Options->Interface->Default format for new worksheets

until the find you the one you want

 

 

Rather obviously, by ensuring that when you specify a floating point format specification (probably one of %e, %f, %g, %y), then the corresponding expression either is (or can be evaluated) to a floating point number.

Integers or rationals will be automatically coerced to a floating point number, so whatever the expression you are formatting is - you can guarantee that it is not

  1. a floating point number
  2. an integer
  3. a rational (ratio of integers)

For example, in the equation definition above

S:= 1 + 2.sin(t) - 1.9.t ;

you appear to think thaat the '.' character can be both a decimal point (as in 1.9) and a multiplication symbol!

There are several other syntax errors.

The above expression has only one root, which can be found using

   S:= 1 + 2*sin(t) - 1.9*t ;
#
# Plot the function just to show that
# there is only one root
#
   plot(S, t=-2..2);
#
# Compute root
#
  Result:= Student[Calculus1]:-Roots(S)

First 185 186 187 188 189 190 191 Last Page 187 of 207