Here's a Mathematica notebook: {{first-order-ode-solvers.nb}}.

You can use this page to solve most first order ODEs. The first block of code does not assume you have any initial conditions. The second block of code has initial conditions.

<sagecell> x = var('x') y = function('y', x) ode = diff(y,x) == y - 1

desolve(ode, y)

</sagecell>

If you have initial conditions, use this block of code. <sagecell> x = var('x') y = function('y', x) ode = diff(y,x) == y - 1 IC=[0,2]

f=desolve(ode, y, ics=IC);

print(f)#Show the solution

plot(f)#graph the solution

</sagecell>

{{page>get_sage}}