Lab #1 Using DSolve and Plot[ ]
To find symbolic solutions of linear and nonlinear differential equations, as well as systems of differential equations, we may use Mathematica's DSolve. For example, to find a general solution for y'' + y = 0, type:
![]()
We must use y[x] instead of simply y, and we must use the double equals instead of a single one. The solution contains the arbitrary parameters C[1] and C[2], typically written as c1 and c2.
The following will graph some members of the two-parameter family of solutions of the differential equation by varying the parameters.

Given initial conditions, a particular solution can be obtained. For example, to solve the initial value problem y'' + y = 0, y( 0 ) = 5, y'( 0 ) = 2, type,
![]()
EXERCISES
1. Solve y' + y = cos( 3x ).
2. Graph several members of the family of solutions of the DE above.
3. Solve the initial value problem: y' + y = cos( 3x ), y( 0 ) = 4.
4. Repeat (1) and (2) for the DE y' + 2y = x.
5. Solve the Bernoulli DE xy' + y = x2y2.