How do I check First Order DE in Maple?

Hi,

Would appreciate some help - Re: checking solutions of the first order DE in Maple?

Tried to search in Help, but could only find solutions to 2nd order DE.

For instance, when I enter:

> ode := diff(y(x), x) = y^2*exp(x);
d 2
--- y(x) = y exp(x)
dx
> solve(ode);

I get:

Error, (in solve) cannot solve expressions with diff(y(x), x) for x
>

Many thanks! Antonio

use dsolve

The procedure you want is dsolve, not solve.  Also, you need to use y(x), not y, as the dependent variable:

ode := diff(y(x), x) = y(x)^2*exp(x);
dsolve(ode,y(x));                    
                                                  1
                                    y(x) = - ------------
                                             exp(x) - _C1

You can include an initial condition so that dsolve will solve for the integration constant:

 dsolve({ode,y(0)=y0}, y(x));         
                                                    y0
                                     y(x) = - ------------------
                                              exp(x) y0 - 1 - y0

Thank you!

Thank you!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}