srmaple

15 Reputation

3 Badges

2 years, 192 days

MaplePrimes Activity


These are replies submitted by srmaple

@dharr I see. This looks much better than the previous ones. Thanks for the code!

Thanks @dharr. This is quite nice, particularly the Taylor expansion at the end. I think this will resolve many issues in other ODEs that I want to solve with Maple.

But I still feel this is an additional and perhaps unncessary work that I should do, that could have been avoided if Maple directly gave me something like Mathematica. Mathematica is a huge pain, even impossible, when it comes to functional derivatives and field theory Poisson brackets and Maple is great for that, and that is why I want to run everything in Maple. But it seems that in these kinds of DEs, Mathematica works way better, and for more complicated situations where the dependence of c__1 and c__2 on beta__c is more complicated than a simple polynomial, I need to solve the DEs in Mathematica and copy the solutions form Mathematica to Maple, and then proceed.    

Thanks @dharr. Nice method! This is almost what I want, and I say almost because the hint that c__2 depends on beta__c comes from the solution that Mathematica gives us. I want Maple to give me an explicit solution with beta__c in both c and p__c  in other cases that I don't know Mathematica's solution, and furthermore these solutions do not vanish for beta__c=0.

In any case, based on your method, I wrote a new code that makes c and p__c themselves beta__c dependent and then I fix f_1(beta__c) and f_2(beta__c) based on what I know from Mathematica.
If you or anyone else comes up with a method that does not need all these manupilations and prior knowlege from Mathematica, and yields the solution right off the bat when we solve the ODEs, it would be great.
 

> 

SysODE1:=diff(c(T,beta__c),T)=-2*c(T,beta__c)*(1 + beta__c*c(T,beta__c)^2/p__c(T,beta__c)^2)

diff(c(T, beta__c), T) = -2*c(T, beta__c)*(1+beta__c*c(T, beta__c)^2/p__c(T, beta__c)^2)

(1)
> 

SysODE2:=diff(p__c(T,beta__c),T)=2*(1 + beta__c*c(T,beta__c)^2/p__c(T,beta__c)^2)*p__c(T,beta__c)

diff(p__c(T, beta__c), T) = 2*(1+beta__c*c(T, beta__c)^2/p__c(T, beta__c)^2)*p__c(T, beta__c)

(2)
> 

 

> 

sol1:=[dsolve([SysODE1, SysODE2],[p__c(T,beta__c),c(T,beta__c)],'explicit')]

[{c(T, beta__c) = 0, p__c(T, beta__c) = f__1(beta__c)*exp(2*T)}, {c(T, beta__c) = 2^(1/2)/(-2*f__1(beta__c)*exp(8*T)-16*f__2(beta__c))^(1/4), p__c(T, beta__c) = -(1/4)*2^(1/2)*(f__2(beta__c)*beta__c*(-2*f__1(beta__c)*exp(8*T)-16*f__2(beta__c))^(1/2))^(1/2)/f__2(beta__c)}, {c(T, beta__c) = 2^(1/2)/(-2*f__1(beta__c)*exp(8*T)-16*f__2(beta__c))^(1/4), p__c(T, beta__c) = (1/4)*2^(1/2)*(f__2(beta__c)*beta__c*(-2*f__1(beta__c)*exp(8*T)-16*f__2(beta__c))^(1/2))^(1/2)/f__2(beta__c)}]

(3)
> 

sol2:=[dsolve([SysODE1, SysODE2],[c(T,beta__c),p__c(T,beta__c)],'explicit')]

[{c(T, beta__c) = 0, p__c(T, beta__c) = f__1(beta__c)*exp(2*T)}, {c(T, beta__c) = -2*(-2*(2*f__1(beta__c)*(exp(T))^8+16*f__2(beta__c))^(1/2)*beta__c*f__2(beta__c))^(1/2)/((2*f__1(beta__c)*(exp(T))^8+16*f__2(beta__c))^(1/2)*beta__c), p__c(T, beta__c) = -(1/2)*(8*f__1(beta__c)*(exp(T))^8+64*f__2(beta__c))^(1/4)}, {c(T, beta__c) = 2*(-2*(2*f__1(beta__c)*(exp(T))^8+16*f__2(beta__c))^(1/2)*beta__c*f__2(beta__c))^(1/2)/((2*f__1(beta__c)*(exp(T))^8+16*f__2(beta__c))^(1/2)*beta__c), p__c(T, beta__c) = -(1/2)*(8*f__1(beta__c)*(exp(T))^8+64*f__2(beta__c))^(1/4)}]

(4)
> 

 

> 

sol1Quantum:=simplify(subs([f__1(beta__c)=c__1,f__2(beta__c)=c__2*beta__c],sol1)) assuming beta__c::positive

[{c(T, beta__c) = 0, p__c(T, beta__c) = c__1*exp(2*T)}, {c(T, beta__c) = 2^(1/2)/(-2*c__1*exp(8*T)-16*c__2*beta__c)^(1/4), p__c(T, beta__c) = -(1/4)*2^(1/2)*(c__2*(-2*c__1*exp(8*T)-16*c__2*beta__c)^(1/2))^(1/2)/c__2}, {c(T, beta__c) = 2^(1/2)/(-2*c__1*exp(8*T)-16*c__2*beta__c)^(1/4), p__c(T, beta__c) = (1/4)*2^(1/2)*(c__2*(-2*c__1*exp(8*T)-16*c__2*beta__c)^(1/2))^(1/2)/c__2}]

(5)
> 

sol2Quantum:=simplify(subs([f__1(beta__c)=c__1,f__2(beta__c)=c__2*beta__c],sol2)) assuming beta__c::positive

[{c(T, beta__c) = 0, p__c(T, beta__c) = c__1*exp(2*T)}, {c(T, beta__c) = -2*2^(1/4)*(-(c__1*exp(8*T)+8*c__2*beta__c)^(1/2)*c__2)^(1/2)/(c__1*exp(8*T)+8*c__2*beta__c)^(1/2), p__c(T, beta__c) = -(1/2)*2^(1/2)*(2*c__1*exp(8*T)+16*c__2*beta__c)^(1/4)}, {c(T, beta__c) = 2*2^(1/4)*(-(c__1*exp(8*T)+8*c__2*beta__c)^(1/2)*c__2)^(1/2)/(c__1*exp(8*T)+8*c__2*beta__c)^(1/2), p__c(T, beta__c) = -(1/2)*2^(1/2)*(2*c__1*exp(8*T)+16*c__2*beta__c)^(1/4)}]

(6)
> 

simplify(subs(beta__c=0,sol1Quantum))

[{c(T, 0) = 0, p__c(T, 0) = c__1*exp(2*T)}, {c(T, 0) = 2^(1/4)/(-c__1*exp(8*T))^(1/4), p__c(T, 0) = -(1/4)*2^(3/4)*(c__2*(-c__1*exp(8*T))^(1/2))^(1/2)/c__2}, {c(T, 0) = 2^(1/4)/(-c__1*exp(8*T))^(1/4), p__c(T, 0) = (1/4)*2^(3/4)*(c__2*(-c__1*exp(8*T))^(1/2))^(1/2)/c__2}]

(7)
> 

simplify(subs(beta__c=0,sol2Quantum))

[{c(T, 0) = 0, p__c(T, 0) = c__1*exp(2*T)}, {c(T, 0) = -2*2^(1/4)*(-(c__1*exp(8*T))^(1/2)*c__2)^(1/2)/(c__1*exp(8*T))^(1/2), p__c(T, 0) = -(1/2)*2^(3/4)*(c__1*exp(8*T))^(1/4)}, {c(T, 0) = 2*2^(1/4)*(-(c__1*exp(8*T))^(1/2)*c__2)^(1/2)/(c__1*exp(8*T))^(1/2), p__c(T, 0) = -(1/2)*2^(3/4)*(c__1*exp(8*T))^(1/4)}]

(8)
> 

 


 

Download Attempt_-_2.mw

Thanks @ecterrab . I tried your suggestion (attached) but it still doesn't work the way I want it. Now c is independent of beta__c, and p__c depends on it, but such that for beta__c=0 I get p__c=0 which is not good. I couldn't really find anything helpful in this case in dsolve,system either.

 

> 

SysODE1:=diff(c(T),T)=-2*c(T)*(1 + beta__c*c(T)^2/p__c(T)^2)

diff(c(T), T) = -2*c(T)*(1+beta__c*c(T)^2/p__c(T)^2)

(1)
> 

SysODE2:=diff(p__c(T),T)=2*(1 + beta__c*c(T)^2/p__c(T)^2)*p__c(T)

diff(p__c(T), T) = 2*(1+beta__c*c(T)^2/p__c(T)^2)*p__c(T)

(2)
> 

 

> 

dsolve([SysODE1, SysODE2],[p__c(T),c(T)],'explicit')

{c(T) = 0, p__c(T) = c__1*exp(2*T)}, {c(T) = 2^(1/2)/(-2*c__1*exp(8*T)-16*c__2)^(1/4), p__c(T) = (1/16)*128^(1/2)*(c__1*exp(8*T)+8*c__2)*(c__2*beta__c/(-2*c__1*exp(8*T)-16*c__2)^(3/2))^(1/2)/c__2}, {c(T) = 2^(1/2)/(-2*c__1*exp(8*T)-16*c__2)^(1/4), p__c(T) = -(1/16)*128^(1/2)*(c__1*exp(8*T)+8*c__2)*(c__2*beta__c/(-2*c__1*exp(8*T)-16*c__2)^(3/2))^(1/2)/c__2}, {c(T) = -2/(-2*(-2*c__1*exp(8*T)-16*c__2)^(1/2))^(1/2), p__c(T) = (1/4)*4^(1/2)*(c__1*exp(8*T)+8*c__2)*(-2*c__2*beta__c/(-2*c__1*exp(8*T)-16*c__2)^(3/2))^(1/2)/c__2}, {c(T) = -2/(-2*(-2*c__1*exp(8*T)-16*c__2)^(1/2))^(1/2), p__c(T) = -(1/4)*4^(1/2)*(c__1*exp(8*T)+8*c__2)*(-2*c__2*beta__c/(-2*c__1*exp(8*T)-16*c__2)^(3/2))^(1/2)/c__2}, {c(T) = 2/(-2*(-2*c__1*exp(8*T)-16*c__2)^(1/2))^(1/2), p__c(T) = (1/2)*(c__1*exp(8*T)+8*c__2)*(-2*c__2*beta__c/(-2*c__1*exp(8*T)-16*c__2)^(3/2))^(1/2)/c__2}, {c(T) = 2/(-2*(-2*c__1*exp(8*T)-16*c__2)^(1/2))^(1/2), p__c(T) = -(1/2)*(c__1*exp(8*T)+8*c__2)*(-2*c__2*beta__c/(-2*c__1*exp(8*T)-16*c__2)^(3/2))^(1/2)/c__2}, {c(T) = -2^(1/2)/(-2*c__1*exp(8*T)-16*c__2)^(1/4), p__c(T) = (1/16)*64^(1/2)*2^(1/2)*(c__1*exp(8*T)+8*c__2)*(c__2*beta__c/(-2*c__1*exp(8*T)-16*c__2)^(3/2))^(1/2)/c__2}, {c(T) = -2^(1/2)/(-2*c__1*exp(8*T)-16*c__2)^(1/4), p__c(T) = -(1/16)*64^(1/2)*2^(1/2)*(c__1*exp(8*T)+8*c__2)*(c__2*beta__c/(-2*c__1*exp(8*T)-16*c__2)^(3/2))^(1/2)/c__2}

(3)
> 

dsolve([SysODE1, SysODE2],[c(T),p__c(T)],'explicit')

{c(T) = -(1/2)*64^(1/2)*(c__2*beta__c/(8*c__1*(exp(T))^8+64*c__2)^(1/2))^(1/2)/beta__c, p__c(T) = -((1/2)*I)*(8*c__1*(exp(T))^8+64*c__2)^(1/4)}, {c(T) = (1/2)*64^(1/2)*(c__2*beta__c/(8*c__1*(exp(T))^8+64*c__2)^(1/2))^(1/2)/beta__c, p__c(T) = -((1/2)*I)*(8*c__1*(exp(T))^8+64*c__2)^(1/4)}, {c(T) = -(1/2)*64^(1/2)*(c__2*beta__c/(8*c__1*(exp(T))^8+64*c__2)^(1/2))^(1/2)/beta__c, p__c(T) = ((1/2)*I)*(8*c__1*(exp(T))^8+64*c__2)^(1/4)}, {c(T) = (1/2)*64^(1/2)*(c__2*beta__c/(8*c__1*(exp(T))^8+64*c__2)^(1/2))^(1/2)/beta__c, p__c(T) = ((1/2)*I)*(8*c__1*(exp(T))^8+64*c__2)^(1/4)}, {c(T) = -2*(-2*c__2*beta__c/(2*c__1*(exp(T))^8+16*c__2)^(1/2))^(1/2)/beta__c, p__c(T) = -(1/2)*(8*c__1*(exp(T))^8+64*c__2)^(1/4)}, {c(T) = (1/2)*(-64*c__2*beta__c/(8*c__1*(exp(T))^8+64*c__2)^(1/2))^(1/2)/beta__c, p__c(T) = -(1/2)*(8*c__1*(exp(T))^8+64*c__2)^(1/4)}, {c(T) = -2*(-2*c__2*beta__c/(2*c__1*(exp(T))^8+16*c__2)^(1/2))^(1/2)/beta__c, p__c(T) = (1/2)*(8*c__1*(exp(T))^8+64*c__2)^(1/4)}, {c(T) = (1/2)*(-64*c__2*beta__c/(8*c__1*(exp(T))^8+64*c__2)^(1/2))^(1/2)/beta__c, p__c(T) = (1/2)*(8*c__1*(exp(T))^8+64*c__2)^(1/4)}

(4)
> 

 

> 

 

> 

 


 

Download Attempt.mw

@acer Thanks for your code. Although now beta__c appears in both c and p__c, they vanish for beta__c-->0 which they shouldn't. If you check Mathematica's solutions, for beta__c-->0 one gets p__c=A e^(2T) and for c=B/e^(2T) wih A, B being constants, and these clearly are not zero. My guess is that some factors of beta__c are absorbed in c1 and c2 in Maple's solution, but I think this is an unnecessary and unhelpful way of representing the solutions by Maple, at least for my purpose.

Do you think there is a way, for example telling Maple to use a different method of solving ODEs, etc., to make Maple give us the solutions in a different format?
 

@nm Thanks. Yes, I know that Maple's solution is correct which can be confirmed by direct substition. The issue is that one expects that beta__c appears in p__c, and furthermore the solutions do not vanish for beta__c=0, which seemingly is the case in this form that Maple presents them. My guess is that some factors of beta__c are absorbed in c1 and c2 in Maple's solution, but I think this is an unnecessary and unhelpful way of representing the solutions by Maple, at least for my purpose.

 

Page 1 of 1