nm

5646 Reputation

17 Badges

8 years, 277 days

MaplePrimes Activity


These are questions asked by nm

Why this error shows up when adding assuming?

restart;
expr:= ln(c^2*y/sqrt(c^2)+sqrt(c^2*y^2+1));
simplify(expr,size=true,evaluate_known_functions=false);
simplify(expr,size=true,evaluate_known_functions=false) assuming real;  #error

 

Is this to be expected?

Maple 2020.2

I think Maple's simplify could need much more improvement. 

Here is another example, which I can't get Maple to simplify to zero for positive x, when it is clearly zero there

restart;
ode:=x = (diff(y(x),x)^2+1)^(1/2)*diff(y(x),x);
mysol:=y(x)=_C1+int(  sqrt(-2+2*sqrt(4*a^2+1))/2,a=0..x);
check:=odetest(mysol,ode);

The above is zero for x>0

But I tried every assumption or option on it, and it will not give zero.

simplify(check) assuming x>0;
simplify(check,symbolic);
simplify(check,symbolic,sqrt) assuming x>0;
simplify(check,sqrt) assuming x>0;
simplify(check,radical) assuming x>0;
simplify(check,power) assuming x>0;
etc...

Here it is in Mathematica

ClearAll[x];
check = x - (Sqrt[2 + 2 Sqrt[4 x^2 + 1]]) (Sqrt[-2 + 2 Sqrt[4 x^2 + 1]])/4;
Simplify[check, Assumptions -> x > 0]

Why Maple can't simplify this to zero?  Is there some other specific trick one must use each time?

Maple 2020.2 on windows 10

 

sometimes I get equations where there is clearly more simplification on it. For an example

restart;
ode:=y(x)=diff(y(x),x)^3*y(x)^2+2*x*diff(y(x),x);
new_ode:=PDEtools:-dchange({y(x)=sqrt(u(x))},ode,{u});

Doing this by hand, I would now write the above as

by multiplying both sides by sqrt(u(x))

new_ode :=sqrt(u(x))*lhs(new_ode)=simplify(sqrt(u(x))*rhs(new_ode))

Since I am doing this in a program, without knowing what the expression is, I need to have this simplification done automatically, since I do not know before hand, if the resulting expression has this form or not. So I automatically call simplify on it.

I tried on a simpler example

expr:=sqrt(u)=1/sqrt(u)

And want to simplify this to u=1

I can't do  

new_expr :=sqrt(u)*lhs(expr)=sqrt(u)*rhs(expr)

Since this is done in a program, without the benefit of looking first and then deciding what to do. Everything needs to be automated since the expression can be anything.

So I need a generic operation to apply and have Maple simplify it, if this pattern exist.  I tried many things, but do far nothing is working:

restart;
expr:=sqrt(u)=1/sqrt(u);
expand(expr);
expand(expr) assuming real;
combine(expr);
combine(expr,sqrt);
combine(expr,radical);
combine(expr,power);
expand(expr);
collect(expr,sqrt(u));
collect(lhs(expr)-rhs(expr)=0,sqrt(u));
simplify(lhs(expr)-rhs(expr)=0) assuming u<>0; # I expected this to work
simplify(expr) assuming real;
simplify(expr,size=false);
simplify(expr,sqrt) assuming real;
simplify(expr,sqrt) assuming positive;
simplify(expr,sqrt,symbolic) assuming positive;
simplify(expr,sqrt,symbolic,size=false) assuming positive;
simplify(expr,symbolic,size=false);
simplify(expr) assuming u<>0;
rationalize(expr);

no change.

Please do not give me an answer that requires one to use specific solution assuming one can see the expression. The solution needs to be something generic and work on any such expression that I can apply to any expression and have Maple simplify the sqrts on both sides, if they are there, since this is done in a program.

From the above, this should have worked


expr:=sqrt(u)=1/sqrt(u);
simplify(lhs(expr)-rhs(expr)=0) assuming u<>0;
simplify(lhs(expr)-rhs(expr)=0,symbolic);

Using Mathematica

ClearAll[u];
expr = Sqrt[u] == 1/Sqrt[u]
Simplify[expr[[1]] - expr[[2]] == 0, Assumptions -> u != 0]

Any suggestions? I am sure there is a simple way to do this in Maple, I just have not found it yet.

Maple 2020.2

 

 

Why Maple can't simplify this expression to zero?

restart;
ode:=diff(y(x),x)-y(x) = x*y(x)^(1/2);
ic:=y(0)=4;
sol:=dsolve([ode, ic],y(x));
check:=odetest(sol,ode);

simplify(check) assuming x>0

In Mathematica:

ClearAll[x]
check = -2*x + 4*x*Exp[x/2] - x^2 -x*Sqrt[x^2 - 8*x*Exp[x/2] + 4*x + 16*Exp[x] - 16*Exp[x/2] + 4]
Simplify[check, Assumptions -> x > 0]

note that using x>=0 instead of x>0 does not change the above output.

Any work around in Maple?

 

I think this is also wrong ode type given by ode advisor.   The following clearly can't be _dAlembert ode. 

restart;
ode:=diff(y(x),x)*tan(diff(y(x),x))+ln(cos(diff(y(x),x))) = y(x);

It does not even have an explicit on its own, in the RHS. D'Alembert ode has the form

The ode above has the form   y=f(p)+g(p)  or one can argue the form y=F(p). Either way, there is no in the RHS.

For the first form above, f(p)=p*ln(p) and g(p)=ln(cos(p))

So why Maple says

DEtools:-odeadvisor(ode)

And Maple knows this. But for some reason, for the above ode, I think it made the wrong call.

restart;
ode:=y(x)=x*f(diff(y(x),x))+g(diff(y(x),x));
DEtools:-odeadvisor(ode);

ode:=y(x)=f(diff(y(x),x))+g(diff(y(x),x));   #no x
DEtools:-odeadvisor(ode)

 

Is there something I am overlooking here? 

Maple 2020.2 with Physics 908 on windows 10

 

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