Ask Your Question

Ashish's profile - activity

2018-01-20 17:49:21 -0600 received badge  Scholar (source)
2018-01-20 17:30:14 -0600 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-20 17:29:43 -0600 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 04:55:27 -0600 received badge  Student (source)
2018-01-19 19:50:19 -0600 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!!!