Introduction to Differential Equations: Types, Examples

#Calculus
TL;DR
A differential equation links an unknown function to its derivatives, and its answer is a function, not a number. This introduction to differential equations covers reading one, the main types and checking a solution.
BT
Bhanzu TeamLast updated on October 11, 202617 min read

What Is A Differential Equation?

In any introduction to differential equations, the first definition is this: a differential equation is an equation that relates an unknown function to one or more of its derivatives. Where an algebra equation asks "which number works?", a differential equation asks "which function works?". The answer you are hunting for is a whole function.

The general form of a differential equation in one unknown function y=y(x)y = y(x) is

F(x, y, dydx, d2ydx2, …, dnydxn)=0F\left(x,\ y,\ \frac{dy}{dx},\ \frac{d^2y}{dx^2},\ \ldots,\ \frac{d^ny}{dx^n}\right) = 0

where:

  • xx is the independent variable (often time tt in applied problems)

  • yy is the unknown function, also called the dependent variable

  • dydx\frac{dy}{dx}, d2ydx2\frac{d^2y}{dx^2}, up to dnydxn\frac{d^ny}{dx^n} are its first, second and nnth derivatives

  • FF is any expression that combines them, and the equation must hold for every xx in some interval, not just at one point

Take the simplest case, dydx=2x\frac{dy}{dx} = 2x. It says "the slope of yy at every point equals twice the xx-coordinate". Integrating gives y=x2+Cy = x^2 + C, where CC is any constant.

Compare that with the algebra equation x2=4x^2 = 4, whose answers are the two numbers 22 and −2-2. If the word "derivative" still feels shaky, a quick refresher on the derivative of a function makes the rest of this page much easier.

Why is it called a differential equation? The name comes from Gottfried Leibniz's notation. He wrote small changes as dxdx and dydy and called them differentials, so an equation built from dydx\frac{dy}{dx} and its relatives became a "differential" equation. The derivative is the differential quotient, and the name stuck.

How Do You Read A Differential Equation?

Read a differential equation as a sentence: the left side is a rate of change, and the right side says what drives that rate. Once you can say an equation out loud in plain words, you know what kind of behaviour its solutions will have before you solve anything.

Differential equation

Read it as

What the solutions do

dPdt=0.02P\frac{dP}{dt} = 0.02P

The population grows at 2 percent of its current size per unit time

Grow faster and faster (exponential growth)

dTdt=−0.1(T−20)\frac{dT}{dt} = -0.1(T - 20)

The temperature changes in proportion to its gap from a 20 degree room, and the minus sign pulls it toward 20

Settle toward 20 from above or below

d2xdt2=−9.8\frac{d^2x}{dt^2} = -9.8

The acceleration is a constant 9.8 metres per second squared, downward

Trace a parabola in time (free fall without air resistance)

d2xdt2=−4x\frac{d^2x}{dt^2} = -4x

The acceleration always points back toward x=0x = 0 and grows with distance

Oscillate back and forth (a spring)

Two habits make reading easier. First, find the unknown function and the variable it depends on; in dTdt\frac{dT}{dt}, the unknown is temperature TT and the variable is time tt. Second, look at the sign of the right side, because a positive right side means the quantity is increasing at that moment and a negative one means it is falling.

Here is the cooling equation checked against a real solution. With a starting temperature of 90 degrees, the solution is T=20+70e−0.1tT = 20 + 70e^{-0.1t}, and after 10 minutes

T(10)=20+70e−1≈45.7516T(10) = 20 + 70e^{-1} \approx 45.7516

so the tea has fallen to about 45.75 degrees, still above the room and still sliding toward it, exactly as the sentence predicted.

What Is The Order Of A Differential Equation?

The order of a differential equation is the order of the highest derivative that appears in it. The order tells you how many arbitrary constants the general solution carries, which is why it is the first thing to check.

Equation

Highest derivative

Order

dydx+3y=x2\frac{dy}{dx} + 3y = x^2

dydx\frac{dy}{dx}

1

d2ydx2+y=0\frac{d^2y}{dx^2} + y = 0

d2ydx2\frac{d^2y}{dx^2}

2

d3ydx3−4dydx=sin⁡x\frac{d^3y}{dx^3} - 4\frac{dy}{dx} = \sin x

d3ydx3\frac{d^3y}{dx^3}

3

The degree is the power of that highest derivative, but only when the equation is a polynomial in its derivatives. For (d2ydx2)3+dydx=x\left(\frac{d^2y}{dx^2}\right)^3 + \frac{dy}{dx} = x, the order is 2 and the degree is 3. For sin⁡(dydx)+y=0\sin\left(\frac{dy}{dx}\right) + y = 0, the degree is not defined at all, because the derivative sits inside a sine. Order and degree have their own detailed page on order and degree of a differential equation, with a longer set of drills.

What Are The Types Of Differential Equations?

Differential equations are sorted along a few independent lines: ordinary or partial, linear or nonlinear, and (for linear equations) homogeneous or non-homogeneous. Each label tells you which solution methods are available, so classifying comes before solving. The table gives two examples of each type, the request that turns up again and again on homework forums.

Type

Meaning

Example 1

Example 2

Ordinary (ODE)

One independent variable, ordinary derivatives

dydx=3y\frac{dy}{dx} = 3y

d2ydt2+4y=0\frac{d^2y}{dt^2} + 4y = 0

Partial (PDE)

Two or more independent variables, partial derivatives

∂u∂t=k∂2u∂x2\frac{\partial u}{\partial t} = k\frac{\partial^2 u}{\partial x^2} (heat)

∂2u∂x2+∂2u∂y2=0\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} = 0 (Laplace)

Linear

yy and its derivatives appear only to the first power, never multiplied together or inside another function

dydx+xy=ex\frac{dy}{dx} + xy = e^x

x2d2ydx2+y=cos⁡xx^2\frac{d^2y}{dx^2} + y = \cos x

Nonlinear

Breaks the linear rule somewhere

dydx=y2\frac{dy}{dx} = y^2

d2θdt2+sin⁡θ=0\frac{d^2\theta}{dt^2} + \sin\theta = 0 (pendulum)

Homogeneous linear

Every term contains yy or a derivative of yy

d2ydx2−y=0\frac{d^2y}{dx^2} - y = 0

dydx+5y=0\frac{dy}{dx} + 5y = 0

Non-homogeneous linear

A term with no yy in it (a forcing term)

dydx+5y=10\frac{dy}{dx} + 5y = 10

d2ydx2+y=sin⁡x\frac{d^2y}{dx^2} + y = \sin x

A linear equation can still have messy coefficients in xx: the test is only about how yy appears. That is why x2d2ydx2+y=cos⁡xx^2\frac{d^2y}{dx^2} + y = \cos x is linear while the innocent-looking dydx=y2\frac{dy}{dx} = y^2 is not.

One warning about vocabulary. The word "homogeneous" means two different things in this subject: the "no forcing term" sense in the table, and a separate first-order sense where dydx\frac{dy}{dx} depends only on yx\frac{y}{x}. Even textbooks switch between the two without saying so, and it is a genuinely confusing pair of meanings. The deeper classification of ODEs (autonomous equations, systems, existence of solutions) lives on the ordinary differential equations page.

What Does It Mean To Solve A Differential Equation?

To solve a differential equation is to find a function that makes the equation true for every value of the variable in some interval. You check a candidate by substituting it, together with its derivatives, into both sides; if the two sides agree identically, it is a solution.

Solutions come in two kinds:

  • General solution: the whole family, written with arbitrary constants. A first-order equation usually carries one constant, a second-order equation two, and so on. For dydx=2x\frac{dy}{dx} = 2x the general solution is y=x2+Cy = x^2 + C, and the +C+ C is the constant of integration you met in integral calculus.

  • Particular solution: one member of that family, picked out by extra information. Given y(1)=4y(1) = 4, the family y=x2+Cy = x^2 + C forces C=3C = 3, so the particular solution is y=x2+3y = x^2 + 3.

A differential equation together with a starting value is called an initial value problem. Geometrically, the general solution is a stack of curves and the initial value is a point; the particular solution is the one curve passing through that point. The full treatment, including when exactly one curve passes through each point, is on the page on initial value problems. (The guarantee behind "exactly one" is the Picard-Lindelöf theorem, a name you will meet again in a later course.)

Back to the 1961 weather model for a moment. The equations there were the general rule; the measured weather on the first day was the initial value; and changing that initial value in the fourth decimal place picked out a different curve. Same family, different member.

Which Methods Solve Differential Equations?

No single method solves every differential equation; you pick a method from the equation's type. The table is the roadmap for a first course, with each method's own lesson linked rather than repeated here.

If the equation looks like

Try this method

Where it is taught

dydx=f(x)\frac{dy}{dx} = f(x)

Integrate both sides directly

Example 4 below

dydx=g(x),h(y)\frac{dy}{dx} = g(x),h(y)

Separate the variables, then integrate

Separable differential equations

dydx+P(x),y=Q(x)\frac{dy}{dx} + P(x),y = Q(x)

Multiply by e∫P(x),dxe^{\int P(x),dx}

Integrating factor method

Higher-order, constant coefficients

Characteristic equation

Linear differential equations

M,dx+N,dy=0M,dx + N,dy = 0 with matching partials

Find the potential function

Exact differential equations

No formula in sight

Sketch the slope field or step forward numerically

Direction fields

The last row matters more than it looks. Most differential equations that model the real world, the 1961 weather equations included, have no solution formula at all, and scientists solve them numerically on computers. A slope field gives you the shape of every solution before you know a single formula.

Examples Of Differential Equations

Example 1

Find the order of each equation and decide whether it is linear: (a) dydx+3y=x2\frac{dy}{dx} + 3y = x^2, (b) d2ydx2+ydydx=0\frac{d^2y}{dx^2} + y\frac{dy}{dx} = 0, (c) ∂u∂t=k∂2u∂x2\frac{\partial u}{\partial t} = k\frac{\partial^2 u}{\partial x^2}.

(a) The highest derivative is dydx\frac{dy}{dx}, so the order is 1. The function yy appears only to the first power, so the equation is linear.

(b) The highest derivative is d2ydx2\frac{d^2y}{dx^2}, so the order is 2. The term ydydxy\frac{dy}{dx} multiplies yy by its own derivative, so the equation is nonlinear.

(c) This is a partial differential equation (two variables, xx and tt). The highest derivative is the second partial in xx, so the order is 2, and it is linear.

Final answer: (a) order 1, linear; (b) order 2, nonlinear; (c) PDE, order 2, linear.

Example 2

Is y=1+xy = 1 + x a solution of dydx=y2\frac{dy}{dx} = y^2?

A tempting shortcut is to test a single point. At x=0x = 0:

dydx=1\frac{dy}{dx} = 1

y2=(1+0)2=1y^2 = (1 + 0)^2 = 1

Both sides equal 1, so it looks like a solution. Now test x=1x = 1:

dydx=1\frac{dy}{dx} = 1

y2=(1+1)2=4y^2 = (1 + 1)^2 = 4

The two sides disagree, so the one-point check was misleading. A solution must work for every xx in an interval, so substitute symbolically instead:

dydx−y2=1−(1+x)2\frac{dy}{dx} - y^2 = 1 - (1 + x)^2

=−x2−2x= -x^2 - 2x

This is zero only at x=0x = 0 and x=−2x = -2, not on any interval. So y=1+xy = 1 + x is not a solution. The function that does work through the point (0,1)(0, 1) is y=11−xy = \frac{1}{1 - x} for x<1x < 1, since

dydx=1(1−x)2=y2\frac{dy}{dx} = \frac{1}{(1 - x)^2} = y^2

Final answer: No. y=1+xy = 1 + x satisfies the equation only at isolated points; y=11−xy = \frac{1}{1 - x} is the solution through (0,1)(0, 1).

Example 3

Show that y=C1cos⁡x+C2sin⁡xy = C_1\cos x + C_2\sin x solves d2ydx2+y=0\frac{d^2y}{dx^2} + y = 0, then find the solution with y(0)=2y(0) = 2 and dydx(0)=3\frac{dy}{dx}(0) = 3.

Differentiate twice:

dydx=−C1sin⁡x+C2cos⁡x\frac{dy}{dx} = -C_1\sin x + C_2\cos x

d2ydx2=−C1cos⁡x−C2sin⁡x\frac{d^2y}{dx^2} = -C_1\cos x - C_2\sin x

Add yy:

d2ydx2+y=0\frac{d^2y}{dx^2} + y = 0

so the family works for every C1C_1 and C2C_2. Apply the two conditions:

y(0)=C1=2y(0) = C_1 = 2

dydx(0)=C2=3\frac{dy}{dx}(0) = C_2 = 3

A second-order equation needed two conditions to fix two constants, exactly as its order predicted.

Final answer: y=2cos⁡x+3sin⁡xy = 2\cos x + 3\sin x.

Example 4

Solve the initial value problem dydx=6x2−4x\frac{dy}{dx} = 6x^2 - 4x with y(1)=5y(1) = 5.

Integrate both sides directly:

y=∫(6x2−4x),dxy = \int (6x^2 - 4x),dx

y=2x3−2x2+Cy = 2x^3 - 2x^2 + C

Use the initial condition:

5=2(1)3−2(1)2+C5 = 2(1)^3 - 2(1)^2 + C

C=5C = 5

Final answer: y=2x3−2x2+5y = 2x^3 - 2x^2 + 5.

Example 5

Find the differential equation whose general solution is y=Ae2x+Be−xy = Ae^{2x} + Be^{-x}, where AA and BB are arbitrary constants.

Two constants mean the equation will be second order. Differentiate twice:

dydx=2Ae2x−Be−x\frac{dy}{dx} = 2Ae^{2x} - Be^{-x}

d2ydx2=4Ae2x+Be−x\frac{d^2y}{dx^2} = 4Ae^{2x} + Be^{-x}

Now look for a combination that cancels both constants. Subtract the first derivative and twice yy:

d2ydx2−dydx−2y=(4A−2A−2A)e2x+(B+B−2B)e−x\frac{d^2y}{dx^2} - \frac{dy}{dx} - 2y = (4A - 2A - 2A)e^{2x} + (B + B - 2B)e^{-x}

=0= 0

Final answer: d2ydx2−dydx−2y=0\frac{d^2y}{dx^2} - \frac{dy}{dx} - 2y = 0.

Example 6

A drip delivers a medicine into the bloodstream at 3 mg per hour, and the body clears it at a rate of 0.5 times the amount present. Write the differential equation, check that M=6(1−e−0.5t)M = 6(1 - e^{-0.5t}) solves it with M(0)=0M(0) = 0, and find the amount after 2 hours.

Rate of change equals rate in minus rate out:

dMdt=3−0.5M\frac{dM}{dt} = 3 - 0.5M

Check the candidate:

dMdt=3e−0.5t\frac{dM}{dt} = 3e^{-0.5t}

3−0.5M=3−3(1−e−0.5t)=3e−0.5t3 - 0.5M = 3 - 3(1 - e^{-0.5t}) = 3e^{-0.5t}

The two sides match, and M(0)=6(1−1)=0M(0) = 6(1 - 1) = 0. After 2 hours:

M(2)=6(1−e−1)≈3.7927M(2) = 6(1 - e^{-1}) \approx 3.7927

As tt grows, e−0.5te^{-0.5t} shrinks to 0 and MM levels off at 6 mg, the amount where the drip and the clearance balance.

Final answer: dMdt=3−0.5M\frac{dM}{dt} = 3 - 0.5M; about 3.7927 mg after 2 hours, levelling off at 6 mg.

Why Do Differential Equations Exist?

Differential equations exist because nature hands us rules about change, not formulas for amounts. "Nature tells us how things change, not where they end." Newton's second law says how velocity changes; Newton's law of cooling says how temperature changes; a growth law says how a population changes. Turning those rules into predictions is exactly the job of a differential equation, and Isaac Newton was already sorting such equations into kinds in 1671, as the history of the differential equation records.

That one idea gives differential equations three jobs:

  • Predict: start from today's state and the rule of change, and compute tomorrow's state (weather, orbits, drug levels).

  • Explain: a law such as "rate proportional to amount" explains why bacteria, savings and radioactive samples all follow the same exponential curve.

  • Design: engineers choose a spring stiffness or a circuit resistance so that the solution of the equation behaves the way they want.

Algebra could not do this. An algebra equation pins down a value; a differential equation pins down a whole history from a rule and a starting point.

Where Are Differential Equations Used In Real Life?

Differential equations are used wherever a quantity changes at a rate you can describe. A few of the places they run quietly in the background:

  • Physics: Newton's second law, F=md2xdt2F = m\frac{d^2x}{dt^2}, is a second-order differential equation for position.

  • Heat: Joseph Fourier's 1822 heat equation describes how temperature spreads through a solid; it is a PDE.

  • Medicine: drug-dosing schedules come from rate-in, rate-out equations like Example 6.

  • Epidemiology: models of infection spread track how the numbers of susceptible, infected and recovered people change.

  • Electronics: the current in a circuit with a resistor and an inductor follows a first-order linear equation.

  • Weather: forecasts solve huge systems of differential equations numerically, the descendants of the 1961 model.

Where Do Students Trip Up On Differential Equations?

Most of the trouble in a first course comes from carrying algebra habits into a subject where the answer is a function. These are the four errors that cost the most.

Mistake 1: Expecting A Number As The Answer

Where it slips in: The first time a student sees dydx=2x\frac{dy}{dx} = 2x, especially when it looks like an algebra exercise.

Don't do this: Do not "solve for xx" and report x=0x = 0 or any other number.

The correct way: Look for a function: y=x2+Cy = x^2 + C is the answer, and every value of CC gives a valid solution.

The memorizer is the student most likely to fall here, because years of "solve for xx" drills have trained the reflex to isolate a variable. The fix is to say out loud, before starting, "I am looking for a function."

Mistake 2: Calling An Equation Linear Because It Looks Simple

Where it slips in: Classifying equations such as dydx=y2\frac{dy}{dx} = y^2 or d2ydx2+ydydx=0\frac{d^2y}{dx^2} + y\frac{dy}{dx} = 0.

Don't do this: Do not judge linearity by how short the equation is or by whether xx appears with powers.

The correct way: Check only how yy appears: first power, never multiplied by itself or its derivatives, never inside sin⁡\sin, ee or a root. Powers of xx in the coefficients are allowed.

Mistake 3: Assigning A Degree That Does Not Exist

Where it slips in: Order-and-degree questions where a derivative sits inside a function, such as sin⁡(dydx)+y=0\sin\left(\frac{dy}{dx}\right) + y = 0.

Don't do this: Do not write "degree 1" just because the highest derivative is not raised to a visible power.

The correct way: Say the degree is not defined, because the equation is not a polynomial in its derivatives. The order (here 1) is still defined.

Mistake 4: Dropping The Constant, Then Ignoring The Initial Condition

Where it slips in: Integrating to get a general solution, then answering an initial value problem.

Don't do this: Do not write y=x2y = x^2 for dydx=2x\frac{dy}{dx} = 2x and stop; without +C+ C there is no way to meet a condition such as y(1)=4y(1) = 4.

The correct way: Keep the constant, then use the condition to fix it: y=x2+3y = x^2 + 3.

Students who arrive straight from a long run of integration drills tend to drop the +C+ C out of habit, and the problem only surfaces later when the initial condition cannot be satisfied. The rusher meets a related version: plugging in the condition before integrating, which fixes the wrong constant. Write the general solution first, every time.

The real-world version of Mistake 4 is the story this page opened with. In 1961, meteorologist Edward Lorenz restarted a weather simulation from printed values that differed from the stored ones in the fourth decimal place, and the forecast diverged completely; his 1963 paper "Deterministic Nonperiodic Flow" launched the study of chaos. The equations were right. Treating the initial condition as a detail was the mistake.

Practice Problems On Introduction To Differential Equations

  1. State the order of d3ydx3−4dydx=sin⁡x\frac{d^3y}{dx^3} - 4\frac{dy}{dx} = \sin x and whether it is linear.

  2. Is y=e4xy = e^{4x} a solution of dydx=4y\frac{dy}{dx} = 4y?

  3. Is y=x3y = x^3 a solution of xdydx=2yx\frac{dy}{dx} = 2y?

  4. Solve dydx=4x3+2\frac{dy}{dx} = 4x^3 + 2 with y(0)=−1y(0) = -1.

  5. Find the differential equation of the family y=Cx3y = Cx^3.

  6. A quantity satisfies dQdt=−0.2Q\frac{dQ}{dt} = -0.2Q with Q(0)=50Q(0) = 50. Check that Q=50e−0.2tQ = 50e^{-0.2t} is the solution and find Q(5)Q(5) to 4 decimal places.

Answer to Problem 1: order 3, linear.

Answer to Problem 2: yes, since dydx=4e4x=4y\frac{dy}{dx} = 4e^{4x} = 4y.

Answer to Problem 3: no, since x⋅3x2=3x3x \cdot 3x^2 = 3x^3, which is not 2x32x^3.

Answer to Problem 4: y=x4+2x−1y = x^4 + 2x - 1.

Answer to Problem 5: xdydx=3yx\frac{dy}{dx} = 3y.

Answer to Problem 6: dQdt=−10e−0.2t=−0.2Q\frac{dQ}{dt} = -10e^{-0.2t} = -0.2Q and Q(0)=50Q(0) = 50; Q(5)=50e−1≈18.3940Q(5) = 50e^{-1} \approx 18.3940.

The Short Version

  • A differential equation relates an unknown function to its derivatives, and its answer is a function, not a number.

  • Read every differential equation as a sentence: the left side is a rate of change and the right side is what drives it.

  • Order (highest derivative), ODE or PDE, and linear or nonlinear are the labels that decide which method applies.

  • An introduction to differential equations always comes back to one check: substitute the candidate and its derivatives, and both sides must agree on a whole interval.

  • The general solution is a family of curves, and an initial condition picks the single curve you need.

Your Next Move

Work through Practice Problems 1 to 6 in order; if Problem 3 or Problem 6 trips you up, return to "What Does It Mean To Solve A Differential Equation?" and redo the substitution check from Example 2 line by line.

Book a free demo class with Bhanzu:

Read More

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What is the best book for an introduction to differential equations?
There is no single best book, but two long-standing choices are Boyce and DiPrima's Elementary Differential Equations and Boundary Value Problems and Tenenbaum and Pollard's Ordinary Differential Equations. For a free start, OpenStax Calculus Volume 2 has an open chapter on the basics. Pick whichever matches the level of your course.
What do you need to know before an introduction to differential equations?
You need confident differentiation and integration, including the chain rule, integration by substitution and the exponential and logarithm functions. Algebra fluency matters more than people expect, because most solutions end with rearranging an equation for yy.
Can you learn the basics of differential equations in a week?
Yes, the basics (reading an equation, finding its order, checking a solution, solving separable and directly integrable equations) fit into a focused week if your calculus is solid. Methods for second-order equations and systems take longer.
How would you explain differential equations to an 8-year-old?
Say it is a rule that tells you how something changes, like "the puddle shrinks a little faster when it is bigger", and the job is to work out what the puddle looks like at every moment.
What is the difference between a differential equation and a difference equation?
A differential equation describes change continuously, using derivatives such as dydt\frac{dy}{dt}. A difference equation describes change in steps, such as yn+1=1.02,yny_{n+1} = 1.02,y_n for a population counted once a year. Computers often turn the first into the second to solve it numerically.
What are the applications of differential equations?
They model motion, heat flow, population growth, radioactive decay, drug levels in the body, electric circuits, the spread of disease and the weather. Any situation described by "how fast something changes" is a candidate.
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →