Preben Alsholm

11664 Reputation

22 Badges

15 years, 227 days

MaplePrimes Activity

These are replies submitted by Preben Alsholm

@Abdoulaye Z(0) = 0 determines the value of the parameter C (when a > 0).

The limits (= sup here) of the solutions for x -> infinity can be found for any concrete value of a > 0 and for 0 < a <= 1 it is largest for a = 1. The limit is 3.
I have just modified my worksheet to include this discussion at the bottom.

@BarKop In acer's worksheet I tried adding summarize = true, and it worked:
W := sort(Statistics:-PolynomialFit(3, Rok, TrzbyCelkemEmco, x, svdtolerance=1e-20,summarize=true));

I'm not aware of any restrictions in Maple on the number of equations etc. The limitations are probably determined only by your computer. But how about giving us the equations?

@reza gugheri Try this:




The generalized hypergeometric functions are described in the help.

The ones appearing in sol are found by indets as shown above:

hypergeom( [3/4+1/4*(-4*nu+5)^(1/2), 3/4-1/4*(-4*nu+5)^(1/2)], [1/2], cos(x)^2),
hypergeom( [5/4+1/4*(-4*nu+5)^(1/2), 5/4-1/4*(-4*nu+5)^(1/2)], [3/2], cos(x)^2),
hypergeom( [7/4+1/4*(-4*nu+5)^(1/2), 7/4-1/4*(-4*nu+5)^(1/2)], [3/2], cos(x)^2),
hypergeom( [9/4+1/4*(-4*nu+5)^(1/2), 9/4-1/4*(-4*nu+5)^(1/2)], [5/2], cos(x)^2)

All four are of the form

hypergeom( [n1, n2], [d1], z)

i.e. the first 2 arguments are lists (lenths 2 and 1 respectively). The third argument is cos(x)^2.


@Carl Love Carl, my guess is that suvetha2000 is struggling to understand the code (or has given up).
You always write very neat and compact code, but often it does require some insight to understand it.


To your remark: " The issue is that my high school students rely on Maple reporting actual solutions ... "

I will say that your students shouldn't rely (or at least not blindly rely) on Maple or any other computer software to give the correct answer at all times. There will always be bugs in computer software, so a healthy suspicion is called for.

Thus in my opinion students should'nt be shielded from bugs, but should learn from them.

This is not meant (of course) to imply that known bugs should not be fixed.

Have you contacted Customer Service?
Does this only happen for plot3d?

@Zeineb Your syntax is still wrong. Please have a closer look at my code and compare it to yours.

There are problems with = instead of := and with the syntax of mod.
(assume still has the space I mentioned.

In your 2D-math you have a space between assume and (a>0 ). In 2D-math input that space is interpreted as multiplication.
So remove the space.
Furthermore, you are making assumptions on a twice. They need to be in the same call to assume:
See ?assume, where it says:
"When the assume function is used to make an assumption about an expression x, all previous assumptions on x are removed."

There are more syntactical problems, e.g. that a loop cannot run unless the upper limit (here N) is concrete.

@Kitonum plot uses numerical integration thus never sees the symbolict result.

Compare to:

G:=int(eval(sqrt(1+((k*Pi)/l*cos((Pi*x)/l))^2),{k=2,l=2}), x);
plot(G, x=0..6,discont=true);

From G you can construct a differentiable (thus continuous) F using piecewise:

plot(F, x=0..6);


Then check:

diff(F,x) assuming x<6;
simplify(%-eval(sqrt(1+((k*Pi)/l*cos((Pi*x)/l))^2),{k=2,l=2}));  # 0

@amirhadiz Using dsolve/numeric with the parameters option is better than using your current approach.
Here is what you can do:

   {-0.1*a*diff(u(z),z,z) + 
     (z-2*diff(v(z)^(-1/2),z))*diff(u(z),z)+(3-2*b*diff(v(z)^(-1/2),z,z))*u(z)= 0, 0.1*diff(v(z),z,z)+0.01*z*a*diff(v(z),z)+0.02*v(z)-u(z)*b*v(z)^(1/2)=0,u(0)=c0, v(0)=0.1, D(u)(0)=c1, D(v)(0)=0};
sol:=dsolve(ode12, numeric,parameters=[a,b,c0,c1]);
sol(parameters=[1,1,0,1]); # Setting parameters
FindSingularity:= proc(params::list(realcons), max::realcons)
     try sol(max)
     catch "cannot evaluate the solution further": 
          return lastexception[-1]
     end try;
end proc:

FindSingularity([1,1,0,1], 4);
FindSingularity([3,2,0,-1], 4);
## I would prefer not to assign to a and b. They are names appearing in dsolve.
## Thus I use aa and bb below:
for aa from 0.1 by 0.1 to 1 do
  for bb from -1 by 0.1 to 1 do 
    print(a=aa, b=bb, `singularity at` = FindSingularity([aa,bb,0,1],5))
  end do
end do;

In the loops above c0 = 0, c1 = 1 as you see.

Since I cannot reproduce the behavior you describe in any version of Maple that I have checked, I think you should tell us which version (release) you are using.

@vv  I tried doing rsolve({req, x(1)=1}, x, makeproc);   in the first worksheet by acer.

But I hadn't noticed that you used a different name (req) than his (eqa) for the recurrence relation.

What I got surprised me:  {req = 0, x(1) = 1}, x, makeproc

I was expecting either an error or a return unevaluated.
The call is sent to `rsolve/makeproc`, which returns unevaluated, but then rsolve itself strips rsolve from the result (called solution):
return op(solution)


@Jan Jensen I should point out the worst problem with the exact solution: It doesn't satisfy the initial condition given x(0) = 0, and yet odetest claims that it does:

evalf(%); # 0. = 2.664536887
odetest(sol3,[eval(ode,{k=1,a=1,b=3}),x(0)=0]); # [0,0]

The [0,0] from odetest means that (1) the ode is satisfies and (2) the initial condition is.

The blame is probably to be put on solve (not really dsolve).

@Jan Jensen To get the same use the option implicit in dsolve:

ode := diff(x(t), t) = k*(a - x(t))*(b - 2*x(t))^2;

There are problems with this approach in this case as you will find out (or have already).

So I suggest solving numerically:

res(parameters=[a=1,k=1,b=3,c=1.1]); # In this form the order is irrelevant
Q:=proc(a,b,c,k,R::range(realcons):=0..10) if not [a,b,c,k]::list(realcons) then return 'procname(_passed)' end if;
end proc;

3 4 5 6 7 8 9 Last Page 5 of 201