Differential equations (function of y)
Solve differential equations where the gradient depends only on y in Year 12 Specialist Mathematics for Queensland (QCAA). When the rate of change depends on the amount alone, you take reciprocals, integrate, and make the variable the subject.
You will learn to find general solutions (a family of curves) and to use an initial condition to pin down the particular solution — the method behind exponential growth, decay and Newton cooling models throughout the rates-of-change topic.
Theory
A differential equation of the form \(\dfrac{dy}{dx}=g(y)\) gives the gradient as a function of \(y\) alone. In Year 12 Specialist Mathematics (QCAA, Queensland) you solve it by turning it upside down — \(\dfrac{dx}{dy}=\dfrac{1}{g(y)}\) — then integrating to get \(x\) in terms of \(y\). Making \(y\) the subject gives the general solution; an initial condition fixes the constant for the particular solution.
A first-order differential equation of the form \(\dfrac{dy}{dx}=g(y)\) tells you the gradient in terms of \(y\) alone. You cannot integrate \(g(y)\) directly with respect to \(x\), because \(y\) is the unknown function of \(x\).
The key move is to take reciprocals: since \(\dfrac{dy}{dx}\) and \(\dfrac{dx}{dy}\) are reciprocals, \(\dfrac{dx}{dy}=\dfrac{1}{g(y)}\). Now the right-hand side is a function of \(y\), so you can integrate both sides with respect to \(y\): \(x=\displaystyle\int\dfrac{1}{g(y)}\,dy\). This is the same idea as separation of variables, written \(\displaystyle\int\dfrac{1}{g(y)}\,dy=\int 1\,dx\).
Integrating introduces one arbitrary constant \(c\). Rearranging to make \(y\) the subject gives the general solution — a whole family of curves, one for each value of the constant.
An initial condition (a known value of \(y\) at a given \(x\)) selects one member of that family. Substituting it to find the constant gives the particular solution, the single curve through that point.
To solve \(\dfrac{dy}{dx}=g(y)\), take reciprocals and integrate with respect to \(y\):
Equivalently, separate the variables and integrate each side:
The most common case is a rate proportional to the amount, \(\dfrac{dy}{dx}=ky\), whose general solution is exponential:
For a shifted linear rate \(\dfrac{dy}{dx}=k(y-a)\) the solution levels off from or towards \(y=a\):
Solving \(\dfrac{dy}{dx}=g(y)\)
- Take reciprocals: write \(\dfrac{dx}{dy}=\dfrac{1}{g(y)}\), so the right-hand side is a function of \(y\) you can integrate.
- Integrate both sides: \(x+c=\displaystyle\int\dfrac{1}{g(y)}\,dy\). Remember the single constant \(c\); for \(\int\dfrac{1}{y}\,dy\) you get \(\ln|y|\).
- Make \(y\) the subject: rearrange to \(y=\dots\) This is the general solution. When you exponentiate, the constant becomes a multiplier \(A=e^{c}\).
- Apply the initial condition: substitute the known \(x\) and \(y\) to find the constant, then write the particular solution.
Take reciprocals so the right-hand side is a function of \(y\):
| \(\dfrac{dx}{dy}\) | \(=\) | \(\dfrac{1}{5y}\) |
Integrate both sides with respect to \(y\):
| \(x\) | \(=\) | \(\dfrac{1}{5}\int\dfrac{1}{y}\,dy\) |
| \(x+c\) | \(=\) | \(\dfrac{1}{5}\ln|y|\) |
Make \(y\) the subject; the constant becomes a multiplier \(A=e^{5c}\):
| \(\ln|y|\) | \(=\) | \(5x+5c\) |
| \(y\) | \(=\) | \(e^{5x}\,e^{5c}\) |
| \(y\) | \(=\) | \(Ae^{5x}\) |
The general solution is \(y=Ae^{5x}\).
Write the right-hand side as \(-(y-4)\), then take reciprocals:
| \(\dfrac{dy}{dx}\) | \(=\) | \(-(y-4)\) |
| \(\dfrac{dx}{dy}\) | \(=\) | \(\dfrac{-1}{y-4}\) |
Integrate both sides with respect to \(y\):
| \(x\) | \(=\) | \(-\int\dfrac{1}{y-4}\,dy\) |
| \(x+c\) | \(=\) | \(-\ln|y-4|\) |
Make \(y\) the subject; set \(A=e^{-c}\):
| \(\ln|y-4|\) | \(=\) | \(-x-c\) |
| \(y-4\) | \(=\) | \(Ae^{-x}\) |
| \(y\) | \(=\) | \(4+Ae^{-x}\) |
The general solution is \(y=4+Ae^{-x}\).
Take reciprocals and integrate the power of \(y\):
| \(\dfrac{dx}{dy}\) | \(=\) | \(\dfrac{1}{y^{2}}\) |
| \(x+c\) | \(=\) | \(\int y^{-2}\,dy\) |
| \(x+c\) | \(=\) | \(-\dfrac{1}{y}\) |
Apply \(y=2\) when \(x=0\) to find \(c\):
| \(0+c\) | \(=\) | \(-\dfrac{1}{2}\) |
| \(c\) | \(=\) | \(-\dfrac{1}{2}\) |
Substitute \(c\) and make \(y\) the subject:
| \(x-\dfrac{1}{2}\) | \(=\) | \(-\dfrac{1}{y}\) |
| \(y\) | \(=\) | \(-\dfrac{1}{x-\tfrac{1}{2}}\) |
| \(y\) | \(=\) | \(\dfrac{2}{1-2x}\) |
The particular solution is \(y=\dfrac{2}{1-2x}\).
Take reciprocals and integrate with respect to \(T\):
| \(\dfrac{dt}{dT}\) | \(=\) | \(\dfrac{-1}{T-25}\) |
| \(t+c\) | \(=\) | \(-\ln|T-25|\) |
Make \(T\) the subject; set \(A=e^{-c}\):
| \(T-25\) | \(=\) | \(Ae^{-t}\) |
Apply \(T=85\) when \(t=0\) to find \(A\):
| \(85-25\) | \(=\) | \(Ae^{0}\) |
| \(A\) | \(=\) | \(60\) |
| \(T\) | \(=\) | \(25+60e^{-t}\) |
As \(t\to\infty\), \(e^{-t}\to 0\):
| \(T\) | \(\to\) | \(25\) |
The particular solution is \(T=25+60e^{-t}\); the long-term temperature is \(25^{\circ}\)C.
Common pitfalls
Frequently asked questions
How do you solve dy/dx = g(y)?
Take reciprocals to get \(\dfrac{dx}{dy}=\dfrac{1}{g(y)}\), integrate both sides with respect to \(y\) so that \(x+c=\displaystyle\int\dfrac{1}{g(y)}\,dy\), then make \(y\) the subject.
What is the difference between a general and a particular solution?
The general solution contains the arbitrary constant from integrating — a whole family of curves. A particular solution uses an initial condition to fix that constant, giving one curve.
Why do you turn dy/dx = g(y) into dx/dy = 1/g(y)?
Because \(g(y)\) is a function of \(y\), not \(x\), you cannot integrate it with respect to \(x\). The reciprocal \(\dfrac{dx}{dy}=\dfrac{1}{g(y)}\) has a right-hand side in \(y\), which you can integrate.
What is the solution of dy/dx = ky?
Separating variables gives \(\ln|y|=kx+c\), so \(y=Ae^{kx}\) with \(A=e^{c}\). This exponential model appears in growth, decay and cooling problems.
Where does the constant A come from?
It is the integration constant. After integrating you have \(\ln|y|=kx+c\); exponentiating turns \(e^{c}\) into a single multiplier \(A\), which can be any non-zero real number.
How do you handle a cooling equation like dT/dt = -(T - a)?
It is the shifted linear case. Integrating gives \(T=a+Ae^{-t}\); apply the starting temperature to find \(A\). The temperature levels off towards \(a\), the surrounding temperature.