Why Trigonometric Factors Need Care
A separable differential equation can often be solved by placing every factor involving \(y\) beside \(dy\), and every factor involving \(x\) beside \(dx\). When the factor involving \(y\) is trigonometric, the resulting integral may require a formula such as the integral of secant or cosecant. Just as importantly, division by a trigonometric factor is allowed only where that factor is nonzero.
For instance, separating \(y'=x\cos y\) by dividing by \(\cos y\) gives an equation involving \(\sec y\). This procedure applies where \(\cos y\ne 0\). Values where \(\cos y=0\) must be considered separately in the original differential equation; they are not automatically covered by the divided equation.
Integrating a Cosine Factor
Consider the equation \(y'=x\cos y\). Where \(\cos y\ne 0\), divide by \(\cos y\) and multiply by \(dx\). This gives \(\sec y\,dy=x\,dx\). The needed antiderivative is the integral of secant:
To see why, differentiate the expression inside the logarithm. Wherever \(\cos y\ne 0\),
Therefore, using \(\frac{d}{dy}\ln|u|=u'/u\) when \(u\ne 0\),
Integrating both sides of the separated equation now gives an implicit relation. An implicit solution is an equation relating \(x\) and \(y\) that need not be rearranged to express \(y\) alone.
Worked Example: Solve a Cosine-Factor Equation Implicitly
Solve \(y'=x\cos y\) on an interval where \(\cos y\ne 0\).
First divide by \(\cos y\), which is permitted only on such an interval:
Since \(y'=\frac{dy}{dx}\), multiply by \(dx\) to separate the variables:
Integrate each side, using \(\int \sec y\,dy=\ln|\sec y+\tan y|+C\) and \(\int x\,dx=x^2/2+C\):
This is the implicit family of solutions on intervals where \(\cos y\ne 0\). To check it, differentiate with respect to \(x\):
Multiplying by \(\cos y\) gives \(y'=x\cos y\), as required. This check is valid on the same intervals where \(\cos y\ne 0\). The constant functions \(y=\frac{\pi}{2}+k\pi\), for integers \(k\), are not produced by dividing by \(\cos y\); substituting any of them into the original equation gives \(y'=0=x\cos y\).
Using an Initial Condition
An initial condition specifies a value \(y(x_0)=y_0\). Substitute that value into the integrated relation to find \(C\). Then check that the resulting solution stays in a range where the division used in separation is valid. Depending on the initial value and the equation, the answer may be clearest as an implicit relation or may be rearranged into an explicit formula.
Worked Example: Apply an Initial Condition and Find an Explicit Solution
Solve \(y'=x\cos y\) with \(y(0)=0\), taking the solution in the interval \(-\frac{\pi}{2}<y<\frac{\pi}{2}\).
Separate and integrate on this interval, where \(\cos y>0\):
Apply \(x=0\) and \(y=0\). Since \(\sec 0=1\) and \(\tan 0=0\),
Thus the implicit solution is \(\ln|\sec y+\tan y|=x^2/2\). On the stated interval, \(\sec y+\tan y>0\), so the absolute value can be removed. The identity \(\sec y+\tan y=\tan(\frac{\pi}{4}+\frac{y}{2})\) then gives
Because \(-\frac{\pi}{2}<y<\frac{\pi}{2}\), the angle \(\frac{\pi}{4}+\frac{y}{2}\) lies between \(0\) and \(\frac{\pi}{2}\). Taking the inverse tangent on this range yields
Check the initial condition: \(e^0=1\) and \(\arctan(1)=\pi/4\), so \(y(0)=2(\pi/4)-\pi/2=0\).
For the differential-equation check, let \(u=e^{x^2/2}\). Then \(u'=xe^{x^2/2}=xu\), and differentiating the explicit solution gives
Also, since \(y=2\arctan u-\pi/2\),
Consequently \(x\cos y=2xu/(1+u^2)=y'\), verifying the differential equation. For every finite real \(x\), \(u>0\), so the displayed formula gives \(-\frac{\pi}{2}<y<\frac{\pi}{2}\); the division by \(\cos y\) is valid throughout.
Integrating a Sine Factor
If the factor involving \(y\) is \(\sin y\), separation can instead produce \(\csc y\,dy\). On intervals where \(\sin y\ne 0\), a useful antiderivative is
This formula can be checked by differentiating. Wherever the logarithm is defined,
The identity \(\sin y=2\sin(y/2)\cos(y/2)\) gives the middle equality. As with secant, this antiderivative is used only on intervals where the separated expression is defined.
Worked Example: Solve an Equation with a Sine Factor
Solve \(y'=x\sin y\) with \(y(0)=\frac{\pi}{2}\), using a solution in \(0<y<\pi\).
On this interval \(\sin y>0\), so divide by \(\sin y\) and separate:
Integrate both sides:
Use \(x=0\), \(y=\pi/2\). Since \(\tan(\pi/4)=1\),
For \(0<y<\pi\), \(\tan(y/2)>0\), so remove the absolute value and exponentiate:
Check the initial condition: \(y(0)=2\arctan(1)=\pi/2\). For the differential equation, set \(u=e^{x^2/2}\), so \(u'=xu\). Differentiation gives
Since \(y=2\arctan u\), the double-angle identity gives \(\sin y=2u/(1+u^2)\). Hence \(y'=x\sin y\). Also \(u\ge 1\) for real \(x\), so \(y\) lies in \([\pi/2,\pi)\); in particular, \(\sin y\ne 0\) for every finite \(x\). The separation and the resulting solution remain valid for all real \(x\).
Why the Domain Check Matters
Separation changes the equation by dividing by a factor, so the separated equation is not automatically equivalent to the original equation at points where that factor is zero. The safe procedure is to state where division is valid, solve there, and substitute any excluded cases into the original equation. This does not require solving every possible special case in advance; it does require not claiming that a divided equation covers points it excluded.
For \(y'=g(x)\cos y\), dividing by \(\cos y\) requires \(\cos y\ne 0\). For \(y'=g(x)\sin y\), dividing by \(\sin y\) requires \(\sin y\ne 0\).
Use the appropriate trigonometric antiderivative and retain the integration constant.
Substitute the specified \(x\) and \(y\) values into the integrated relation before rearranging it.
Differentiate the implicit or explicit solution, substitute into the original equation, and verify that the divisor remains nonzero on the interval claimed.
Common Mistake: Treating a Restricted Formula as Global
A frequent error is to divide by \(\cos y\), derive a formula, and then claim that it covers values where \(\cos y=0\). For example, the calculation
is not valid when \(\cos y=0\). Substituting \(y=\pi/2\) into that divided equation would require division by zero. But in the original equation \(y'=x\cos y\), the constant function \(y=\pi/2\) gives \(y'=0\) and \(x\cos(\pi/2)=0\), so it does satisfy the equation.
The correction is to state that the separated calculation applies where \(\cos y\ne 0\), and to test the excluded case in the original equation. Likewise, for a sine factor, do not divide by \(\sin y\) at a point where \(\sin y=0\). Absolute values in logarithmic antiderivatives also matter: removing them is justified only after the chosen interval establishes the sign of the expression inside.
Choosing an Implicit or Explicit Answer
An implicit relation is a valid way to present a solution when it states a relation between \(x\) and \(y\) and its validity conditions are clear. Rearranging into an explicit formula can be useful, especially when an initial condition selects a particular branch of an inverse trigonometric function. It is not necessary to force an explicit expression if doing so obscures the interval or creates branch ambiguity.
Check Your Understanding
For each question, state any condition needed for the separation step before integrating.
- Separate and integrate \(y'=3x\cos y\), giving an implicit solution on an interval where division is valid.
- For \(y'=x\sin y\), what condition on \(y\) is required before dividing by \(\sin y\)?
- Apply \(y(0)=0\) to the implicit family \(\ln|\sec y+\tan y|=x^2/2+C\) and find \(C\).
- Why must a solution derived by dividing by \(\cos y\) be checked against the original equation at values where \(\cos y=0\)?
- Differentiate \(\ln|\tan(y/2)|\) with respect to \(y\) and identify the trigonometric function obtained.