Last Updated 10/31/2022

Sage Essentials
Section 8: Differential Equations

Solving Differential Equations (DE) for Symbolic Solutions

The desolve() command can be used to solve for first and second order DE symbolically.

Example 1

Solve the DE d y d x = x y .

We are solving for functions y( x )  that satisfy the DE. The first task is to define the symbolic function y( x )  in SageMath.

Next, we assign a name for the DE. In this case, we use the name “de”.

 

Finally, we execute the desolve() command.

 

Try this!

Solve the DE dy dx = y 2 4 .


← Previous Example Next Example →