Separation of Variables Examples: 45 Problems with Answers

Worked examples of Separation of Variables to try before you open each solution, then practice problems with answers.

Worked Examples

Example 1

easy
Solve dy/dx=xy with y(0)=2.
Show solution

Answer

y=2ex2/2

First step

1.
Separate: dy/y=x dx. Integrate: ln⁡∣y∣=x2/2+C.

Full solution

  1. 2.
    y=Aex2/2. y(0)=2⇒A=2.
  2. 3.
    Solution: y=2ex2/2.
Separate, integrate both sides, exponentiate, apply IC.

Example 2

hard
Solve the logistic DE dy/dt=y(1−y) with y(0)=1/2.

Example 3

easy
Solve dydx=2x with y(0)=5.

Example 4

medium
A radioactive substance decays with dNdt=−λN. Solve for N(t) given N(0)=N0.

Example 5

hard
A tank initially holds 50 L of pure water. Brine with 0.2 kg/L of salt flows in at 2 L/min, and the well-mixed solution flows out at the same rate. Let S(t) be salt amount; derive and solve the ODE.

Example 6

challenge
A skydiver's velocity satisfies dvdt=g−kv with v(0)=0, g=9.8 m/s2, k=0.2 s−1. Solve for v(t) and find the terminal velocity.

Practice Problems

Try each one, then open the solution to compare your method.

Example 1

easy
Solve dy/dx=x/y with y(0)=3.

Example 2

medium
Solve Newton's cooling: dT/dt=−0.1(T−20), T(0)=80.

Example 3

easy
Is dydx=xy separable?

Example 4

easy
Separate the variables in dydx=xy.

Example 5

easy
Solve dydx=y by separation.

Example 6

easy
After separating dyy=x dx, integrate both sides.

Example 7

easy
Is dydx=x+y separable?

Example 8

easy
What equilibrium solution might be lost when solving dydx=y by dividing by y?

Example 9

easy
Separate dydx=xy.

Example 10

easy
Solve dydx=1y.

Example 11

medium
Solve the IVP dydx=xy, y(0)=2.

Example 12

medium
Solve dydx=xy with y(0)=3.

Example 13

medium
Solve dydx=ky generally by separation.

Example 14

medium
Solve dydx=cos⁡x⋅y with y(0)=1.

Example 15

medium
Solve Newton's cooling dTdt=−k(T−20) generally.

Example 16

medium
Solve dydx=y2 with y(0)=1.

Example 17

medium
Find the equilibrium solutions of dydx=y(2−y) before separating.

Example 18

medium
Solve dydx=ex−y.

Example 19

medium
Solve dydx=yx for x>0 by separation.

Example 20

challenge
Solve the logistic IVP dydx=y(1−y), y(0)=12.

Example 21

challenge
Solve dydx=2x1+y2 with y(0)=0.

Example 22

challenge
A tank's salt obeys dSdt=−S100 with S(0)=20. Find S(t) and the half-life.

Example 23

easy
Is dydx=sin⁡xy separable?

Example 24

easy
Solve dydx=3 by separation, with y(0)=2.

Example 25

easy
Solve dydx=−3y with y(0)=10.

Example 26

medium
Solve dydx=2xy with y(0)=1.

Example 27

medium
Solve dydx=y2−1x for x>0, y(1)=0, by separation. Identify the constant.

Example 28

medium
Solve dydx=ex⋅e−y with y(0)=0.

Example 29

medium
Solve the IVP dydx=x+1y, y(0)=2.

Example 30

medium
Solve dydx=y2sec⁡2x with y(0)=1.

Example 31

medium
Find the general solution to dydx=3x2y2.

Example 32

medium
Solve Newton's heating: dTdt=k(100−T) with T(0)=20, k=0.05.

Example 33

medium
Solve dydx=yx2 with y(1)=e.

Example 34

hard
Solve dydx=(1+y2) x with y(0)=1.

Example 35

hard
Solve dydx=xexy with y(0)=2.

Example 36

hard
Solve the IVP dydx=cos⁡x2y+1 with y(0)=0.

Example 37

hard
Solve dydx=x1+y2 generally.

Example 38

challenge
Solve dydx=y(1−y)x for x>0, with y(1)=1/2.

Example 39

challenge
Solve dydx=2xyx2+1 generally.

What to focus on

Core idea: If dydx factors into an x-part times a y-part, separate them onto opposite sides and integrate each.

Common stuck point: The procedure for separation of variables is the easy part; the trap is trying to separate a non-product right side. Asking "Can I rewrite the DE so one side has only y and dy, the other only x and dx?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

Ask yourself: Can I rewrite the DE so one side has only y and dy, the other only x and dx?

Concept recap

A method for solving first-order DEs of the form dydx=f(x)⋅g(y): rearrange to dyg(y)=f(x) dx, then integrate both sides.

Separating variables is like sorting a jar of mixed coins into two currencies before counting: once each pile holds one kind, you can total it by its own rules. Coins fused together, like the x+y in dydx=x+y, can't be sorted at all. Unlike coin counting, each total comes with an unknown constant that a starting value must fix.

Read the full lesson on Separation of Variables

Separation of Variables is covered with related ideas in the guide How to Integrate Rational Functions: Long Division and Partial Fractions.

Background knowledge

These ideas may be useful before you work through the harder examples.

differential equations introintegral