Solving Simple Differential Equations
This tutorial explains how to solve simple first-order differential equations of the form
\[ \frac{dy}{dx} = f(x) \]These equations are solved by integrating both sides with respect to \(x\). The constant \(C\) represents the constant of integration.
Worked Examples
Example 1
Solve:
\[ \frac{dy}{dx} = 2x + 1 \]Solution
\[ \int y' \, dx = \int (2x + 1)\,dx \] \[ y = x^2 + x + C \]You may verify by differentiation that this satisfies the original equation.
Example 2
Solve:
\[ 2\frac{dy}{dx} = \sin(2x) \]Solution
\[ y' = \frac{1}{2}\sin(2x) \] \[ y = \int \frac{1}{2}\sin(2x)\,dx \] Let \(u = 2x\), so \(du = 2dx\): \[ y = \int \frac{1}{4}\sin(u)\,du \] \[ y = -\frac{1}{4}\cos(u) + C = -\frac{1}{4}\cos(2x) + C \]Example 3
Solve:
\[ y'e^{-x} + e^{2x} = 0 \]Solution
Multiply both sides by \(e^x\), simplify and rewrite as: \[ y' = -e^{3x} \] Integrate: \[ y = \int -e^{3x}\,dx \] Let \(u=3x\), \(du=3dx\): \[ y = \int -\frac{1}{3}e^{u}\,du \] \[ y = -\frac{1}{3}e^{3x} + C \]Practice Exercises
Solve the following:
a) \(2\frac{dy}{dx} = 6x\)
b) \(y'\cos(x)=\sin(2x)\)
c) \(y'e^x=e^{3x}\)
Answers
a) \(y=\frac{3}{2}x^2+C\)
b) \(y=-2\cos(x)+C\)
c) \(y=\frac{1}{2}e^{2x}+C\)
Further Reading
More Differential Equations Tutorials
Runge–Kutta Method for Differential Equations