5479 Reputation

9 Badges

3 years, 175 days

MaplePrimes Activity

These are replies submitted by vv


Your worksheet is in Maple 2017.3.
In Maple 2018.2 (which I use) it works.


A pdetest should not be necessary for u(x,y,t) if u(y,t) is verified. Anyway, here it is:

pde := diff(u(x, y, t), t)-1/2*(diff(u(x, y, t), y, y))-A*sin(M*x-t) = 0;
bc[1] := u(x, 0, t) = 0;
bc[2] := u(x, 10, t) = A*sin(M*x-t);
sys := [pde, bc[1], bc[2]];

SYS:=eval(sys, u = ((x,y,t) -> U(y,t)));

sol:= eval(SOL, U = ((y,t) -> u(x,y,t)));


You cannot do this mathematically.
E.g.  you may obtain an antiderivative (=indefinite integral) as  ln(x) + c1   or  ln(2*x) + c2.
Which one of c1, c2  should be 0?

Of course, you may use definite integrals.

@Carl Love 

It is worth mentioning that for a large k (say >1000) it's practically impossible to prove the primality.
We'll have to be happy with the "probably prime" status.


For simple k,z as above it's easy to compute EllipticF(infinity, k) by hand, splitting the integral and using changes of variables.


Yes, I know about the flaws. I have just copied OP's procedures in order to show the idea.


Yes, but only for real k,z (z --> +infinity).
For example, for k=I/2, z --> I*infinity,  the limit is  EllipticCK(k)*I.


The OP says "connections from i to j"; I'd use "between i and j" for an undirected graph.
Anyway it's OP who will decide which one is best for him.

@sadaf bibi 

In any CAS it's very difficult to rewrite an expression in your preferred form.
For example, from an expanded polynomial it will be hard to obtain  (2*x^2 - x - 1)^15 + x^9 + 7 even if you like it very much.

In your cases:
1.  csch  and coth  are  not "independent".  A lot of acrobatics will be needed to express an exponential exactly as you want it. There are infinitely many equivalent forms.

2. The second phi is wrong (2D input): you have spaces after sech.

@sadaf bibi 

If you want to retrieve a solution Q(xi) then compute a := Q(0)  (or a := limit(Q(xi), xi=0))  and take phi(0) = a  as initial condition.  But why don'd you just check Q(xi) in the ODE?

BTW, you have used incorrectly the 2D input in your second solution. I'd recommend to use 1D input.


@sadaf bibi



E1 := (diff(phi(xi), xi))^2-a*phi(xi)^2-b*phi(xi)^3-c*phi(xi)^4;

(diff(phi(xi), xi))^2-a*phi(xi)^2-b*phi(xi)^3-c*phi(xi)^4


S:=dsolve({E1, phi(0) = b*a/(a*c-b^2)},  phi(xi)):
simplify([S], symbolic);

[phi(xi) = 4*a*b*exp(xi*a^(1/2))/((4*a*c-b^2)*exp(2*xi*a^(1/2))-2*b^2*(exp(xi*a^(1/2))+1/2)), phi(xi) = 4*a*exp(-xi*a^(1/2))*b/((4*a*c-b^2)*exp(-2*xi*a^(1/2))-2*b^2*(exp(-xi*a^(1/2))+1/2))]


g:= -a*b*sech((1/2)*sqrt(a)*xi)^2/(b^2-a*c*(1-tanh((1/2)*sqrt(a)*xi))^2);






simplify(rhs(S[2]) - gg, symbolic);




Download -ode.mw

@Carl Love 

I just wanted to post my foldl version when I saw that you alredy have posted CartProd_NestedSeq which is almost the same.
It seems to be the fastest.

@Carl Love 

Yes, you are right. Only for huge numbers the procedure could have problems if Digits is not large enough.
(Of course my procedure, where Digits is increased automatically if necessary, could be very slow in such cases).


Yes, it would be interesting to look at a beginner's face seeing:

 [seq(Array(`..`~(1, numelems~([L]))[], ()-> `?[]`~([L], `[]`~([args]))))]

Of course I understand that Carl's intention was to simply use the procedure, not to understand it.
(And the procedure is really nice as a substitute for CartesianProduct!)

@Carl Love 

I think that the default limit for real arguments is standard and generally accepted.

Note that for limit(f(x),x=c, right), where c is complex, Maple computes limit(f(c+t), t=0, right).

1 2 3 4 5 6 7 Last Page 1 of 109