nm

10229 Reputation

19 Badges

12 years, 151 days

MaplePrimes Activity


These are questions asked by nm

Here is another ode solution by Maple, I am not able to get zero from odetest. 

If someone could come up with a trick or method to verify this, that will be great. I tried all sort of assumptions and not able to get zero. Even coulditbe() could not give zero. 

It is a Chini ode and also homogeneous, `class G`.

Solving using either method, odetest do not returns zero.  There are no initial conditions. I am sure the solutions are correct, but odetest need some help or may be this requires different method to verify not using odetest?

Worksheet below.

 

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1796 and is the same as the version installed in this computer, created 2024, August 29, 14:22 hours Pacific Time.`

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

restart;

ode:=diff(y(x),x) = a*x^(n/(1-n))+b*y(x)^n;
DEtools:-odeadvisor(ode,y(x));

diff(y(x), x) = a*x^(n/(1-n))+b*y(x)^n

[[_homogeneous, `class G`], _Chini]

maple_sol:=dsolve(ode,y(x),[Chini],useInt,implicit); #explicit makes it take very long time
 

Intat(1/(_a^n/(b^(-n-1)*(a*x^(-n/(-1+n)))^(-2*n+1)*(-x^(-n/(-1+n)-1)*a*n*b/(-1+n))^n*n^(-n))-_a+1), _a = -y(x)/((-1+n)*x*a*x^(-n/(-1+n))))-(Int(-1/((-1+n)*x), x))+c__1 = 0

residual:=odetest(maple_sol,ode); #how to show this is zero?

n^n*(-y(x)*x^(1/(-1+n))/(a*(-1+n)))^n*(a*x^(-n/(-1+n)))^(2*n)*(-a*b*n*x^(-2*n/(-1+n)+1/(-1+n))/(-1+n))^(-n)*b^(n+1)-b*y(x)^n

coulditbe(residual=0) assuming real;

FAIL

#now solving as homog. (which gives simpler looking solution

maple_sol:=dsolve(ode,y(x),[homogeneous]);

Int(x^(n/(-1+n))/((b*x*(-1+n)*_a^n+_a)*x^(n/(-1+n))+a*x*(-1+n)), _a = _b .. y(x))-c__1 = 0

residual:=odetest(maple_sol,ode); #how to show this is zero?

-b*y(x)^n*n/(-1+n)-x^(-1-1/(-1+n))*a*n/(-1+n)+b*y(x)^n/(-1+n)+x^(-1-1/(-1+n))*a/(-1+n)-y(x)/(x*(-1+n))

coulditbe(residual=0) assuming real;

FAIL

 


 

Download challenge_odetest_sept_1_2024.mw

 

What is the correct syntax in Maple to do integration of variables on 

So that the new integration variable is using the mapping    u=y*x^(1/3) so that the result is 

The problems seems is that there is no option to tell Maple what the new integration variable is. So it does not know it should be y or x?

I looked at help and all my tries failed. Below is worksheet and also examples from another software as reference. The other software has argument to tell change of variable what is the new integration variable should be. But in Maple, there is no such option.,  Does this mean in Maple change of integration variables only works when the right hand side of the transformation has only one symbol and not two or more? i.e. this works   u=y, but not u=y*x

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

T:=Student:-MultivariateCalculus;
e:=Int(1/(3*u^4 + u + 3),u);
T:-ChangeOfVariables(e,[u=y*x^(1/3)]);
T:-ChangeOfVariables(e,[y=u*x^(-1/3)]);

Student:-MultivariateCalculus

Int(1/(3*u^4+u+3), u)

Error, (in Student:-MultivariateCalculus:-ChangeOfVariables) unable to complete the change-of-variables operation

Error, (in Student:-MultivariateCalculus:-ChangeOfVariables) unable to complete the change-of-variables operation

Student[Calculus1][IntTutor](); #did not help either

 

 

Download change_of_variables_integration_august_31_2024.mw

I searched help and see nothing specific to change of variable for integration, so I assumed the above is the command to use. Am I using the wrong command for integration change of variables in Maple?

For reference, I need to duplicate this in Maple:

Is one not supposed to make _Z local variable?  If not, then how to insure the global _Z do not have some value assigned to it?

In this example below, I build some integral. I used local _Z for upport limit. But now Maple generate internal error.

If I do not declare _Z as local, and leave it global, then no error is generated.

But if I also declare _Z inside the proc as global _Z, then the error also goes away.

So is one always supposed to use _Z as global? 

The strange thing _Z is protected, so I cant assign to it value from global space. Message says Try declaring `local _Z`; see ?protect for details. but when I do that, I still get an error. 

So is the bottom line here is that one should not declare _Z local to a proc, and just assume it is always global symbol that has no assigned value to it, and that will always be safe to do?  I do not assign value to _Z inside my proc. Just wanted to use it for upper limit, as symbol.

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

foo:=proc()
 local _Z;
 local F,G,H,n;
 F:=x;G:=x;G:=x;n:=4;
 -RootOf(Intat(F^(-n-1)*H^(-2*n+1)*(-G*F*n*H)^n*n^(-n)/(-
         tau*F^(-n-1)*H^(-2*n+1)*(-G*F*n*H)^n*n^(-n)+F^(-n-1)*H^(-2*n+1)*(-G*F
         *n*H)^n*n^(-n)+tau^n),tau = _Z)-Int(-G,x)+C1)/G*H;
end proc:

foo()

Error, (in RootOf) expression independent of, _Z

boo:=proc()
 local F,G,H,n;
 F:=x;G:=x;G:=x;n:=4;
 -RootOf(Intat(F^(-n-1)*H^(-2*n+1)*(-G*F*n*H)^n*n^(-n)/(-
         tau*F^(-n-1)*H^(-2*n+1)*(-G*F*n*H)^n*n^(-n)+F^(-n-1)*H^(-2*n+1)*(-G*F
         *n*H)^n*n^(-n)+tau^n),tau = _Z)-Int(-G,x)+C1)/G*H;
end proc:

boo();

-RootOf(Intat(x^3/(H^3*tau^4-tau*x^3+x^3), tau = _Z)-(Int(-x, x))+C1)*H/x

boo2:=proc()
 global _Z;
 local F,G,H,n;
 F:=x;G:=x;G:=x;n:=4;
 -RootOf(Intat(F^(-n-1)*H^(-2*n+1)*(-G*F*n*H)^n*n^(-n)/(-
         tau*F^(-n-1)*H^(-2*n+1)*(-G*F*n*H)^n*n^(-n)+F^(-n-1)*H^(-2*n+1)*(-G*F
         *n*H)^n*n^(-n)+tau^n),tau = _Z)-Int(-G,x)+C1)/G*H;
end proc:

boo2()

-RootOf(Intat(x^3/(H^3*tau^4-tau*x^3+x^3), tau = _Z)-(Int(-x, x))+C1)*H/x

_Z:=5;

Error, attempting to assign to `_Z` which is protected.  Try declaring `local _Z`; see ?protect for details.

local _Z;
foo();

Warning, A new binding for the name `_Z` has been created. The global instance of this name is still accessible using the :- prefix, :-`_Z`.  See ?protect for details.

_Z

Error, (in RootOf) expression independent of, _Z

 

 

Download using_Z_inside_proc_august_28_2024.mw

For me this result is suspicious. What do you think? 

This ode diff(y(x),x) = f*y(x)^4+g*y(x)+h; is clearly quadrature, since I did not tell Maple that f,g,h depend on x. So this can be solved by just integration. But when asking odeadvisor if it is Chini, it says yes. When asking it what type it is, now it says it is quadrature.

Am I missing something here? I was expecting [NONE] when asking it if it is Chini.

Yes, the ode has the form of Chini, which is   y'=f(x)*y^n + g(x)*y + h(x), where n=4 here. But if f,g,h do not depend on x, then this is now just quadrature. Right? Calling it Chini is little misleading I think.

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1796 and is the same as the version installed in this computer, created 2024, August 29, 14:22 hours Pacific Time.`

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

restart;

ode:=diff(y(x),x) = f*y(x)^4+g*y(x)+h;
DEtools:-odeadvisor(ode,y(x),[Chini]);

diff(y(x), x) = f*y(x)^4+g*y(x)+h

[_Chini]

DEtools:-odeadvisor(ode,y(x))

[_quadrature]

dsolve(ode,y(x),[quadrature]);

x-Intat(1/(_a^4*f+_a*g+h), _a = y(x))-c__1 = 0

dsolve(ode,y(x),[Chini]);

y(x) = -RootOf(Intat(g^4/(_a^4*f*h^3-_a*g^4+g^4), _a = _Z)+g*x+c__1)*h/g

 

 

Download question_on_advisor_august_28_2024.mw

Notice another problem in this solutions. If g=0, then the Chini solution gives divison by zero now, while the quadrature solution still works.

Why Maple can not do this basic combining of two terms? What do  I need to do to help Maple do it? Am I not using the correct command?

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1795 and is the same as the version installed in this computer, created 2024, August 28, 23:14 hours Pacific Time.`

e:=B^2/(4*(k^n)^(2/3)) - (k^n)^(1/3)*x;

(1/4)*B^2/(k^n)^(2/3)-(k^n)^(1/3)*x

combine(e);

(1/4)*B^2/(k^n)^(2/3)-(k^n)^(1/3)*x

combine(e,symbolic)

(1/4)*B^2*k^(-(2/3)*n)-k^((1/3)*n)*x

combine(e,power)

(1/4)*B^2/(k^n)^(2/3)-(k^n)^(1/3)*x

combine(e,radical)

(1/4)*B^2/(k^n)^(2/3)-(k^n)^(1/3)*x

combine(e,radical,symbolic)

(1/4)*B^2/(k^n)^(2/3)-(k^n)^(1/3)*x

combine(e) assuming positive;

(1/4)*B^2*k^(-(2/3)*n)-k^((1/3)*n)*x

combine(e,abs)

(1/4)*B^2/(k^n)^(2/3)-(k^n)^(1/3)*x

 

 

Download how_to_combine_august_28_2024.mw

For reference, using another software, this is what it gives

4 5 6 7 8 9 10 Last Page 6 of 186