next up previous contents
Next: Maxima-Mode Up: Calculus Previous: Numerical Integration

Differential Equations

ode(expression,y,x) solves the linear first-order differential equation $y'=f(x)\cdot y + g(x)$. expression is the complete right-hand-side of the equation, x and y are symbolic variables. Free constants in the solution are marked C.
>> ode(x,y,x)
ans = 0.5*x^2+C
>> syms k
>> ode(-k*y,y,x)
ans = C*exp(-k*x)
>> ode(y*tan(x)+cos(x),y,x)
ans = (0.5*cos(x)*sin(x)+(0.5*x+C))/cos(x)



Helmut Dersch
2009-03-15