Why the Exponent Changes the Method
The equation \( \frac{dy}{dx}=xy^n \) is separable: its right-hand side is a product of a function of \(x\) and a power of \(y\). Separating variables turns the differential equation into an integration problem. The exponent \(n\) determines an important distinction: when \(n=1\), the \(y\)-side integrates to a logarithm; when \(n\ne 1\), it integrates to a power.
An initial condition \(y(x_0)=y_0\) determines a particular solution, but it does not remove the need to check the solution's domain. In particular, formulas involving noninteger powers of \(y\) are naturally considered on intervals where \(y>0\).
Separating the Variables
Suppose \(y>0\) on the interval being considered. Starting from \( \frac{dy}{dx}=xy^n \), divide by \(y^n\) and multiply by \(dx\):
This form indicates that we integrate the left side with respect to \(y\) and the right side with respect to \(x\). The antiderivative of \(y^{-n}\) depends on whether its exponent is \(-1\), which occurs exactly when \(n=1\).
The Case \(n=1\): Exponential Form
When \(n=1\), the equation is \( \frac{dy}{dx}=xy \). For a nonzero solution, divide by \(y\) and integrate:
Equivalently, on a positive-valued interval, exponentiating gives \(y=Ae^{x^2/2}\) for a positive constant \(A\). If \(y(x_0)=y_0>0\), it is convenient to use the initial value directly:
Indeed, setting \(x=x_0\) gives \(y(x_0)=y_0e^0=y_0\). The same expression works for negative \(y_0\), because the equation is linear in \(y\) and the exponential factor is positive. If \(y_0=0\), the solution is \(y(x)=0\).
Worked Example: Solving an Initial-Value Problem When \(n=1\)
Solve \( \frac{dy}{dx}=xy \) with \(y(1)=3\).
Here \(x_0=1\), \(y_0=3\), and \(n=1\). The formula gives
This is defined for every real \(x\). To check the differential equation, differentiate:
The initial value is also correct:
Thus the formula satisfies both the differential equation and the initial condition.
The Case \(n\ne 1\): Power Form
For \(n\ne 1\), the power rule for integration gives
Consequently, separating and integrating yields
The initial condition \(y(x_0)=y_0>0\) determines the constant. Subtracting the equation at \(x=x_0\) from the general equation gives
Solving for \(y\) produces the positive-valued solution formula:
The positive bracket condition is not an optional technical detail. A real power with a noninteger exponent need not be defined for a negative base. Also, the derivation divided by \(y^n\), so it applies only where \(y\ne 0\). If \(n>0\), check \(y=0\) separately in the original equation.
Worked Example: A Power-Law Equation with \(n=2\)
Solve \( \frac{dy}{dx}=xy^2 \) with \(y(0)=1\), and state the interval on which the resulting positive solution is valid.
Here \(n=2\), \(x_0=0\), and \(y_0=1\). Substitute these values into the formula:
Since \(1^{1-2}=1\), \(\frac{1-2}{2}=-\frac12\), and \(1/(1-2)=-1\), this becomes
For the positive solution, the denominator must be positive:
Check the differential equation by differentiating:
Meanwhile,
Thus \(y'=xy^2\). The initial condition checks as \(y(0)=1/(1-0)=1\). The solution is valid on the interval \((-\sqrt{2},\sqrt{2})\), which contains the initial point.
Why the Formula Works
The power formula can be justified directly using the chain rule. This also clarifies why the exponent \(1-n\) appears. Assume \(y>0\), \(n\ne1\), and \(y'=xy^n\). Differentiate \(y^{1-n}\):
Integrating with respect to \(x\) gives
If \(y(x_0)=y_0\), substitute \(x_0\) and \(y_0\) to determine \(C_1\):
Substituting this constant back yields
which gives the stated solution after raising both sides to the power \(1/(1-n)\), on an interval where the right-hand side is positive. This derivation shows that the formula is not a pattern to memorize without conditions: it follows from the chain rule and integration, with positivity ensuring the real power is valid.
Worked Example: A Fractional Exponent
Solve \( \frac{dy}{dx}=x\sqrt{y} \) with \(y(0)=4\), using the positive-valued solution.
Since \(\sqrt{y}=y^{1/2}\), the exponent is \(n=\frac12\). The initial values are \(x_0=0\) and \(y_0=4\). The general initial-value formula becomes
Evaluate each part: \(4^{1/2}=2\), \(\frac{1-1/2}{2}=\frac14\), and \(1/(1-1/2)=2\). Therefore,
The bracket \(2+x^2/4\) is positive for every real \(x\), so this positive solution is defined for all real \(x\). To check it, let \(g(x)=2+x^2/4\), so \(y=g^2\). Then \(g'(x)=x/2\), and
Because \(g(x)>0\), we have \(\sqrt{y(x)}=g(x)=2+x^2/4\). Hence \(x\sqrt{y}=x(2+x^2/4)=y'\). Finally, \(y(0)=(2+0)^2=4\). Both the equation and the initial condition are satisfied.
A Common Integration Mistake
A frequent error is to forget the denominator in the power rule. For \(n=2\), one might incorrectly write
This is wrong: differentiating \(y^{-1}\) gives \(-y^{-2}\), not \(y^{-2}\). The correct integral is
The error changes the resulting solution. For example, using the incorrect integral for \(y'=xy^2\) with \(y(0)=1\) leads to \(1/y=1+x^2/2\), or \(y=1/(1+x^2/2)\). Differentiate that incorrect candidate:
These expressions are not equal in general. The corrected integration gives \( -1/y=x^2/2+C \). Applying \(y(0)=1\) gives \(C=-1\), so \(1/y=1-x^2/2\), matching the checked solution above.
Using Initial Conditions Responsibly
For an initial-value problem, the initial point must lie in the interval where the solution formula is defined. For \(n\ne1\) and \(y_0>0\), the bracket equals \(y_0^{1-n}>0\) at \(x=x_0\), so the initial point is valid. Moving away from it, however, the bracket may reach zero. The positive-valued formula cannot be continued through a point where the bracket is nonpositive.
A reliable workflow is:
Separate the \(n=1\) logarithmic case from the \(n\ne1\) power case.
Keep the factor \(1/(1-n)\) when \(n\ne1\).
Use \(y(x_0)=y_0\) to determine the constant or write the solution directly in terms of \(x_0\) and \(y_0\).
Ensure the expression is real on the interval containing \(x_0\), then differentiate and substitute the initial point.
These checks distinguish a formal expression from a valid solution to an initial-value problem. The equation, the initial value, and the domain must all agree.
Check Your Understanding
For each problem, identify the relevant case and check any domain restriction that applies.
- Solve \( \frac{dy}{dx}=xy \) with \(y(0)=2\), and verify the initial value.
- Solve \( \frac{dy}{dx}=xy^3 \) with \(y(0)=1\). Where is the positive-valued formula valid?
- For \( \frac{dy}{dx}=x\sqrt{y} \) with \(y(1)=1\), write the positive-valued solution formula and state the condition that its bracket must satisfy.
- Explain why integrating \(y^{-2}\) as \(y^{-1}\) gives an incorrect answer.
- If \(n>0\), why should \(y=0\) be checked separately after separating variables?