Separation of Variables Examples: 45 Problems with Answers

Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Separation of Variables.

This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in Math.

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.

If the rate of change factors into a piece that depends only on x and a piece that depends only on y, you can sort them onto opposite sides of the equation—all the y-stuff on the left, all the x-stuff on the right—then integrate each side in its own variable.

Read the full concept explanation →

How to Use These Examples

  • Read the first worked example with the solution open so the structure is clear.
  • Try the practice problems before revealing each solution.
  • Use the related concepts and background knowledge badges if you feel stuck.

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.

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

Worked Examples

Example 1

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

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 these problems on your own first, 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.

Background Knowledge

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

differential equations introintegral