Variables separable · Mathematics Class 11–12 | StemPy Lab
Course 13.2·Lesson 1 of 3
Variables separable
A first-order equation is separable when it can be written as dxdy=f(x)g(y)
Lesson 1 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
recognise a separable equation and pull its two variables apart;
integrate both sides, add one constant, and fix it from a point on the curve;
find the constant solutions that the division loses.
Pulling the letters apart
A bank pays interest on the money that is in the account. The more money there is, the faster it grows. If y is the amount and x is the time, the rule is dxdy=ky. The rate depends on y and on nothing else. Can you find y?
Move every y to one side and every x to the other: ydy=kdx. Now each side can be integrated by itself. This is the whole idea of this lesson.
An equation of the form
dxdy=f(x)g(y)
is called separable. NCERT calls it a differential equation of the "variable separable" type. A-Level, IB and AP texts say "separable". The two names mean the same thing.
The steps
Check. The right side must be a product of a function of x alone and a function of y alone.
Separate. Write g(y)dy=f(x)dx. Here we divide by g(y), so we need g(y)=0.
Integrate both sides.∫g(y)dy=∫f(x)dx+C. One constant is enough.
Use the condition. A point (x0,y0) on the curve fixes C.
Look back at the division. If g(y)=0 has a solution y=y1, then the constant function y=y1 also satisfies the equation. Check whether the general solution already contains it.
A convenient form of the constant
Take dxdy=4xy. Then ydy=4xdx, so ln∣y∣=2x2+c. The constant c is any real number. Raise e to both sides: ∣y∣=ece2x2. Write ±ec as one letter C. Then
y=Ce2x2.
Here C is any non-zero number. The value C=0 gives y=0, which is also a solution (it is the lost one, because g(y)=y is zero there). So C may be any real number.
You may also write the constant as lnC from the start. Then ln∣y∣=2x2+lnC becomes ∣y∣=Ce2x2 with C>0. Both ways are correct.
Worked examples
Example 1. Find the curve with dxdy=4xy through (0,3).
The general solution is y=Ce2x2.
Put in the point: 3=Ce0=C.
The curve is y=3e2x2.
Example 2. Solve (1+x2)dxdy=1+y2 with y=1 at x=0.
Separate: 1+y2dy=1+x2dx.
Integrate: tan−1y=tan−1x+c.
At (0,1): 4π=0+c. So tan−1y=tan−1x+4π.
Take the tangent of both sides and use tan(A+B) with tan4π=1: y=1−x⋅1x+1. So y=1−x1+x for x<1.
Example 3. Solve dxdy=ex+y with y=0 at x=0.
Write ex+y=exey and separate: e−ydy=exdx.
Integrate: −e−y=ex+c, so ex+e−y=C.
At (0,0): 1+1=C=2. So e−y=2−ex and y=−ln(2−ex) for x<ln2.
When division loses a solution
Take dxdy=x(1−y2). Here g(y)=1−y2 is zero at y=1 and y=−1. Both constant functions satisfy the equation, because their slope is 0 and so is the right side.
Now divide where g(y)=0. The integral of 1−y2dy is 21ln1−y1+y. So
21ln1−y1+y=2x2+c.
For ∣y∣<1 this gives y=tanh(2x2+c). For ∣y∣>1 it gives y=coth(2x2+c). No choice of c gives y=1 exactly, so the two constant solutions are extra.
A graph of solution curves of the equation dy/dx = x(1 - y squared), for x from -2.6 to 2.6. Two dashed red horizontal lines mark the constant solutions y = 1 and y = -1. Three blue curves lie between the red lines: they dip or rise and then climb towards y = 1 on both sides. Orange curves lie above y = 1 and below y = -1: each has a bump or dip at x = 0 and then flattens towards the nearest red line. No curve crosses a red line.
The curves never touch the lines y=±1. This is not an accident. Two different solutions of this equation do not cross.
Practise with new numbers
Try it in Python
The program takes dxdy=xy with y=1 at x=0. Separation gives lny=2x2. The program checks the answer by its slope, and by the two sides of the separated equation.
Common mistakes
Writing ∫ydy=2y2 or ∫ydx on the left. The y side must have dy, and the x side must have dx.
Adding a constant on each side. One constant on one side is enough.
Losing a constant solution. After dividing by g(y), ask what happens when g(y)=0.
Dropping the absolute value in ln∣y∣ before the constant is fixed. Fix the sign by the point, not by habit.
Trying to separate a sum. In dxdy=x+y the right side is not a product, so this method does not apply. You need the linear method of the third lesson.
Remember these
dxdy=f(x)g(y) separates into g(y)dy=f(x)dx.
Integrate both sides, with one constant, and use the point to fix it.
The zeros of g give constant solutions. Check whether the general solution has them.
NCERT says "variable separable". A-Level, IB and AP say "separable".
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Solve dxdy=xy for x>0 and y>0.
Solve eydxdy=1.
Solve dxdy=x2(y+3).
Find the constant solutions of dxdy=(y−2)(y+1). What is lost if you divide by (y−2)(y+1)?