nm

8552 Reputation

19 Badges

12 years, 350 days

MaplePrimes Activity


These are questions asked by nm

This integral produces very large result and division by zero when simplified. I do not have earlier version of Maple to check if this is a new problem or not

f:=1/(3*u^(2/3)+3*((-4*u^(1/3)+1)*u^(4/3))^(1/2)-12*u);
anti:=int(f,u);
MmaTranslator:-Mma:-LeafCount(anti);
simplify(anti)

For reference, this is Mathematica's results with leaf count only 35 instead of 41,385 and no problem when simplifying.

f=1/(3*u^(2/3)+3*((-4*u^(1/3)+1)*u^(4/3))^(1/2)-12*u)
anti=Integrate[f,u]
LeafCount[anti]
Simplify[anti]

Could someone please check if this fails same way on earlier Maple version?

in the context of solving an ode, sometimes the constant of integration that will satisfy an initial condition is +infinity or -infinity.

But Maple's solve does not find such solutions to the constant of integration. It only can solve for finite value if it can.

When this happens, I manually try taking the limit as the constant of integration goes to +- infinity, until I get an equation where both sides are the same or fail, and then give up.

I was wondering if there is a way or different command/package which will find solution such as infinity (which is valid solution to constant of integration).

Here are two examples

ode:=diff(y(x),x)=1/(LambertW(-exp(-1+_C1+x))+1);
ic:=[diff(y(x),x)=1,x=0];
eq2:=eval(ode,ic);
solution_for_constant := solve(eq2,_C1,'allsolutions'=true,'tryhard'=true);

Maple can not solve for _C1. It gives

But when trying manually few values, I find that _C1=-infinity satisfies the equation

limit(rhs(eq2),_C1=0);
limit(rhs(eq2),_C1=1);
limit(rhs(eq2),_C1=-1);
limit(rhs(eq2),_C1=infinity);
limit(rhs(eq2),_C1=-infinity);

The above shows that _C1 = -infinity is the constant of integration. Another simpler example

eq:=exp(-1 + _C1) = 0;
solution_for_constant:=solve(eq,_C1) assuming real;
limit(lhs(eq),_C1=-infinity)

The above shows that _C1=-infinity is solution for exp(-1+C_1)=0.  which one can see by just looking at it as exp(-infinity)=0.  Adding assumptions did not help.I also tried symbolic option.

I am not familar with SolveTools package, may there is something there.

So for now, my code just try the limit until it finds solution or gives up.

Any suggestions if Maple itself can find such solutions?

Maple 2022.2

I have few questions on this subject.

1) One can view internal maple procs using the command showstats. For example showstat(`dsolve`) prints the dsolve proc. And showstat(`dsolve/SERIES`)  prints the proc called  dsolve/SERIES(). And this i s what I do not understand. What is the signifcance of in the above?    Since dsolve itself is a proc, what does mean? does this means SERIES is an internal proc inside dsolve proc? That is not likely. I see things like convert/tan/simpler again, what does the mean here? it can't be that simpler is an inner proc inside tan proc which is inside convert proc? I never used /  myself in mycode in a proc name.

How are these procs organized physically? I mean inside Maplesoft computers. Is each proc in separate .mpl file? How does the /  comes into play?  I tried to make a proc myself with forward / but got syntax error. So this / must mean some other logical relation, but I do not know to emulate it myself.

 

2) Why one must add ` ` around the names when using showstats for system procs, but not for my own module? For example, I did the following

A:=module()
  export foo:=proc()
      NULL;
  end proc;
end module;
                    
showstat(A:-foo)

And that worked. But if I type showstat(`A:-foo`)  maple gives error Error, (in showstat) procedure name expected

but with system proc, must have the `` there. If I type showstat(convert/tan/simpler) it is an error.

 

3) Why showstat(`DEtools/odeadvisor`)  gives Error, (in showstat) procedure name expected? But help says odeadvisor is in DEtools module.

 

4) Why can't one display the source of the module itself, and it has to be a proc? For example showstat(`DEtools`) gives error, because `DEtools` is not a proc, but a whole module.

Are these things described more somewhere? I only know about with(LibraryTools); 
Browse(); 

anyone has smart tricks to verify this Maple solution to this first order ode? I think the solution is correct. But can't figure how to make odetest result simplify to zero.

restart;
ode:=diff(y(x),x)=x*(y(x)^2-1)^(2/3);
sol:=dsolve(ode);
odetest(sol,ode);
coulditbe(%=0);

I tried few simplification on the output of odetest to see if will become zero, but no success.  This is one of those solutions which is hard for odetest to show it is zero because of the signum there, so thought to ask, may be someone will find a smart trick.

Maple 2022.2 on windows 10.

if isolate fail, then it returns back the input equation. But if solve failed to solve for the variable in question, it returns either NULL or empty list, or empty set (depending on the input). So it is easy to check if it failed or not.

How does one check that isolate failed? Should I check the left side of what isolate returns is the variable I am solving for? For an example,

sol:=isolate(-2*y-cos(y)+x+sin(x)-_C1 = 0,y)

returns back -2*y-cos(y)+x+sin(x)-_C1 = 0

Is the following the correct way to check if isolate solved the equation or not:

sol:=isolate(-2*y-cos(y)+x+sin(x)-_C1 = 0,y);
if lhs(sol)=y then
   print("it solved it. Soltion is ",sol);
else
   print("Failed to solve it. Try solve command now ");
fi;

Just wanted to make sure as help for isolate does not mention anything about what happens if isolate can't solve the equation.

Maple 2022.1

First 23 24 25 26 27 28 29 Last Page 25 of 164