What is Calculus II · Differential Equations

a Differential Equation?

An equation involving a function and its derivatives — the language of change in science, engineering, and nature.

A differential equation is an equation whose unknown is a function rather than a number, and which involves that function together with one or more of its derivatives. Solving a differential equation means finding the function (or family of functions) that satisfies the relationship.

Unlike algebraic equations like \(x^2 = 4\), a differential equation describes how something changes — making it the natural language for physics, biology, economics, and engineering.

General form — 1st order ODE
$$\frac{dy}{dx} = f(x,\, y)$$
General form — 2nd order ODE
$$a\,y'' + b\,y' + c\,y = g(x)$$

The order of a differential equation is the highest derivative that appears. The degree is the power to which that highest derivative is raised (when the equation is polynomial in derivatives).

🌡️
Newton's law of cooling

A hot cup of coffee cools faster when it's much hotter than the room and slower as temperatures equalise. This rate-of-change relationship — "the derivative of temperature is proportional to the difference in temperatures" — is a differential equation:

\(\dfrac{dT}{dt} = -k(T - T_{\text{room}})\)

Solving it tells you the temperature at every future moment. The equation doesn't give you \(T\) directly — it describes how \(T\) changes, and integration uncovers \(T\) itself.

🔄
A rule about change, not a value

An algebraic equation pins down a number. A differential equation pins down a pattern of change. There are usually infinitely many functions satisfying a differential equation — one for each initial condition (starting value) you impose. That's why solutions come with arbitrary constants \(C\).

By variables
ODE vs PDE
Ordinary (ODE): one independent variable. Partial (PDE): two or more. Most Calc II content is ODEs.
ODE: \(y' = 2y\)
PDE: \(\frac{\partial u}{\partial t} = k\frac{\partial^2 u}{\partial x^2}\)
By order
1st, 2nd, … order
Order = highest derivative present. First-order equations model simple growth, cooling, mixing. Second-order model oscillations and circuits.
1st order: \(y' + y = 0\)
2nd order: \(y'' + \omega^2 y = 0\)
By linearity
Linear vs Nonlinear
Linear: \(y\) and all its derivatives appear to the first power only, no products of \(y\) with its derivatives. Otherwise nonlinear.
Linear: \(y'' - 3y' + 2y = e^x\)
Nonlinear: \(y' = y^2\)
By right-hand side
Homogeneous vs Non-homogeneous
A linear ODE is homogeneous if \(g(x) = 0\), otherwise non-homogeneous. The solution structure differs in each case.
Hom: \(y'' + y = 0\)
Non-hom: \(y'' + y = \sin x\)

A separable first-order ODE can be written so that all \(y\)-terms are on one side and all \(x\)-terms on the other. Then both sides can be integrated independently.

Separable form
$$\frac{dy}{dx} = g(x)\cdot h(y) \quad \implies \quad \frac{dy}{h(y)} = g(x)\,dx$$
1
Separate variables
Rewrite so all \(y\) (and \(dy\)) are on the left, all \(x\) (and \(dx\)) on the right.
\(\dfrac{dy}{h(y)} = g(x)\,dx\)
2
Integrate both sides
Integrate independently. Add a single constant \(C\) on one side.
\(\displaystyle\int \frac{dy}{h(y)} = \int g(x)\,dx + C\)
3
Solve for \(y\)
Isolate \(y\) to get the general solution. Apply an initial condition \(y(x_0) = y_0\) to find \(C\) for the particular solution.
📈
Biology / Finance
Exponential Growth & Decay
\(\dfrac{dP}{dt} = kP\)
Solution: \(P = P_0 e^{kt}\)
Physics / Engineering
Newton's Law of Cooling
\(\dfrac{dT}{dt} = -k(T - T_\infty)\)
Solution: \(T = T_\infty + Ce^{-kt}\)
🔋
Electrical Engineering
RC Circuit
\(R\,\dfrac{dq}{dt} + \dfrac{q}{C} = V(t)\)
Charge as a function of time
🌊
Physics
Simple Harmonic Motion
\(y'' + \omega^2 y = 0\)
Solution: \(y = A\cos\omega t + B\sin\omega t\)
🧪
Chemistry
Mixing Problems
\(\dfrac{dA}{dt} = \text{rate in} - \text{rate out}\)
Amount of substance over time
🦠
Epidemiology
Logistic Growth
\(\dfrac{dP}{dt} = rP\!\left(1-\dfrac{P}{K}\right)\)
Population with carrying capacity
Example 1 — Separable
Solve \(\dfrac{dy}{dx} = xy\), with \(y(0) = 2\).
Separate: \(\dfrac{dy}{y} = x\,dx\)

Integrate: \(\ln|y| = \dfrac{x^2}{2} + C_1\)

Exponentiate: \(y = Ce^{x^2/2}\)

Apply \(y(0)=2\): \(C = 2\)
Particular solution: \(y = 2e^{x^2/2}\)
Example 2 — Exponential decay
A substance decays at rate proportional to its mass. Half-life is 10 years. Find mass at \(t = 30\).
\(\dfrac{dm}{dt} = -km\) → \(m = m_0 e^{-kt}\)

Half-life: \(\dfrac{m_0}{2} = m_0 e^{-10k}\)
\(\Rightarrow k = \dfrac{\ln 2}{10}\)

At \(t = 30\): \(m = m_0 e^{-3\ln 2} = \dfrac{m_0}{8}\)
After 3 half-lives, \(\tfrac{1}{8}\) of the original mass remains.
Example 3 — Linear 1st order
Solve \(y' + 2y = 4x\).
Integrating factor: \(\mu = e^{\int 2\,dx} = e^{2x}\)

Multiply: \((e^{2x}y)' = 4xe^{2x}\)

Integrate (by parts):
\(e^{2x}y = e^{2x}(2x-1) + C\)
General solution: \(y = 2x - 1 + Ce^{-2x}\)
Example 4 — 2nd order homogeneous
Solve \(y'' - 5y' + 6y = 0\).
Characteristic equation:
\(r^2 - 5r + 6 = 0\)
\((r-2)(r-3) = 0\)
\(r_1 = 2,\quad r_2 = 3\)

Two distinct real roots:
General solution: \(y = C_1 e^{2x} + C_2 e^{3x}\)
✗ Forgetting the constant of integration
Every integration step introduces a \(+C\). In a differential equation, this constant represents the entire family of solutions. Dropping it gives only one particular solution, not the general one.
✗ Dividing by zero when separating
Dividing both sides by \(h(y)\) to separate variables is only valid when \(h(y) \ne 0\). Constant solutions where \(h(y) = 0\) (called equilibrium solutions) must be checked separately.
✗ Misidentifying order and degree
Order is the highest derivative present. Degree is the power of that highest derivative (when rational). In \((y'')^3 + y = 0\), the order is 2 and the degree is 3 — not the other way around.
✗ Using the wrong solution method
Separable, linear, exact, and homogeneous equations each require different techniques. Always classify first. Trying to separate a non-separable equation wastes time and produces wrong answers.

Ready to test your knowledge?

Differential equations appear in every branch of science and engineering. Practice setting them up and solving them with our quizzes.

Browse All Quizzes →