Ask Your Question

Ashish's profile - activity

2018-01-21 00:49:21 +0100 received badge  Scholar (source)
2018-01-21 00:30:14 +0100 commented answer IVP and complex solutions

Emmanuel Charpentier: Your idea works great. Thanks!!!!!!!

x=var('x');y=function('y')(x)
a=(desolve(diff(y(x),x)==3*y-2*y^2,y,ics=[0,1/2])*3).exp().maxima_methods().exponentialize().solve(y(x))
a=solve(a,y(x))[0].rhs()
plot(a,(x,0,10),ymin=0,ymax=2)
2018-01-21 00:29:43 +0100 answered a question IVP and complex solutions

dan_fulea:

Thanks!!! I appreciate your response but I was hoping that Sage would give me the solution without having to do the extra step of raising both sides of the implicit solution to E^(##) and then solving for y(x).

Emmanuel Charpentier: Your idea works great. Thanks!!!!!!!

2018-01-20 11:55:27 +0100 received badge  Student (source)
2018-01-20 02:50:19 +0100 asked a question IVP and complex solutions
f(x,y)=-(-3*y+2*y^2)
p5sol2=desolve(diff(y,x)==f(x,y),y,ics=[0,0.5])

Returns the following:

-1/3*log(2*y(x) - 3) + 1/3*log(y(x)) == x - 26714619/25510582*I - 27229598/58926009

I get the following result from Mathematica:

y[x] -> (1.5 E^(3 x))/(2. + E^(3 x))

Why is sage returning a complex solution? I am assuming it has to do with the logs and absolute values when integrating. Any help will be appreciated. Thanks!!!