Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The examples should instruct you to give the x and y variable initial conditions, like in this example straight from the documentation:

sage: f = desolve(diff(y,x) + y - 1, y, ics=[10,2]); f
(e^10 + e^x)*e^(-x)

The examples should instruct you to give the x and y variable initial conditions, like in this example straight from the documentation:

sage: f = desolve(diff(y,x) + y - 1, y, ics=[10,2]); f
(e^10 + e^x)*e^(-x)

To be precise,

sage: t = var('t')
sage: y = function('y',t)
sage: de = t*diff(y,t) + y - t*exp(t^2)
sage: sol = desolve(de,y,[2,1])
sage: sol
-1/2*(e^4 - e^(t^2) - 4)/t
sage: sl = (t*exp(t^2)-x)/t
sage: plot_slope_field(sl,(t,2,2.1),(x,1,10))+plot(sol,(t,2,2.1))

where the slope field coincides very nicely with the solution.