Why Trigonometric Factors Require Care
A separable differential equation can often be solved by integrating a reciprocal factor. With trigonometric factors, the antiderivative may involve logarithms, and the trigonometric function may vanish repeatedly. Both features matter: the logarithm is valid only on suitable intervals, and dividing by a factor that is zero can discard constant solutions.
Consider an equation of the form \(y'=g(x)h(y)\), where \(g\) is continuous on an interval and \(h\) is a trigonometric function. Wherever \(h(y)\ne 0\), separation gives an equation involving \(1/h(y)\). The integration is performed on an interval of \(y\)-values that does not contain a zero of \(h\). A solution on such an interval is one branch of the solution; periodicity does not make the branches interchangeable.
Useful Trigonometric Antiderivatives
These standard antiderivatives are useful after separation. Each formula applies on an interval where its integrand is defined. The absolute value in a logarithm is essential when its argument can be negative.
| Integrand | Antiderivative | Restriction |
|---|---|---|
| \(\csc y\) | \(\ln|\tan(y/2)|+C\) | \(\sin y\ne0\) |
| \(\sec y\) | \(\ln|\sec y+\tan y|+C\) | \(\cos y\ne0\) |
| \(\tan y\) | \(-\ln|\cos y|+C\) | \(\cos y\ne0\) |
| \(\cot y\) | \(\ln|\sin y|+C\) | \(\sin y\ne0\) |
For example, differentiating \(\ln|\tan(y/2)|\) on an interval where \(\sin y\ne0\) gives \(\csc y\). A related form is \(\ln|\csc y-\cot y|\); the two forms differ only by an equivalent trigonometric identity on their domains. These logarithmic expressions describe a solution implicitly at first. To obtain an explicit formula, one must select an inverse-trigonometric branch that stays in the interval where the separation was done.
Why Separation Works on a Branch
Suppose \(y'=g(x)h(y)\), and let \(J\) be an interval on which \(h\) is continuous and never zero. Define \(H\) on \(J\) by \(H'(y)=1/h(y)\), and choose \(G\) so that \(G'(x)=g(x)\). Along any differentiable solution whose values stay in \(J\), the chain rule gives the separated relation. Conversely, differentiating that relation recovers the differential equation, as long as \(y\) remains in \(J\).
Integrating with respect to \(x\) therefore gives \(H(y(x))=G(x)+C\). Since \(H'(y)=1/h(y)\) is nonzero on \(J\), \(H\) is strictly monotone there and can be inverted on its range. This explains both the usefulness and the limitation of separation: it gives solutions only where division by \(h(y)\) is valid.
Worked Example: A Sine Factor
Worked Example: Solving \(y'=2x\sin y\)
Solve the initial-value problem \(y'=2x\sin y\), \(y(0)=\pi/2\). First, the initial value lies in the branch interval \((0,\pi)\), where \(\sin y\ne0\). Divide by \(\sin y\) on that interval and integrate both sides:
Apply the initial condition. Since \(\tan((\pi/2)/2)=\tan(\pi/4)=1\), the left side is \(\ln 1=0\) at \(x=0\), so \(C=0\). On the chosen interval \((0,\pi)\), \(\tan(y/2)>0\), giving \(\tan(y/2)=e^{x^2}\). The inverse tangent must return \(y/2\in(0,\pi/2)\), so the solution is
Check the initial value: \(y(0)=2\arctan(1)=\pi/2\). For the differential equation, set \(z=e^{x^2}\); then \(z'=2xz\), and
Thus the formula satisfies the equation. It stays in \((0,\pi)\) for every real \(x\), so it remains on the branch used in the separation.
Periodic Branches and Inverse Trigonometric Functions
The same implicit equation can represent different solutions on different intervals. For the sine example, \(\sin y\) vanishes at \(y=k\pi\), where \(k\) is an integer. Its nonzero branch intervals are \((k\pi,(k+1)\pi)\). On each one, the integral \(\ln|\tan(y/2)|\) is valid, but solving for \(y\) requires choosing the inverse tangent branch that places \(y\) back in that interval.
For instance, if separation gives \(\tan(y/2)=K e^{G(x)}\), with nonzero constant \(K\), the principal inverse tangent alone takes values only in \((-\pi/2,\pi/2)\). Adding an appropriate multiple of \(2\pi\), and choosing the sign of \(K\) consistently, places the solution in the intended branch. An expression that solves the implicit relation but lies in another branch may not satisfy the initial condition.
Worked Example: A Cosine Factor and a Branch Choice
Solve \(y'=x\cos y\), \(y(0)=0\). The initial value lies in \((-\pi/2,\pi/2)\), where \(\cos y\ne0\). Separate and integrate:
At \(x=0\), \(y=0\), so \(\sec 0+\tan 0=1\), and \(C=0\). On \((-\pi/2,\pi/2)\), \(\sec y+\tan y=\tan(\pi/4+y/2)>0\). Hence
The expression is in \((-\pi/2,\pi/2)\), and at \(x=0\) it gives \(2\arctan(1)-\pi/2=0\). To check it, put \(z=e^{x^2/2}\), so \(z'=xz\). Then
Therefore \(y'=x\cos y\), as required.
Zeros of the Separated Factor
Dividing by \(h(y)\) is not valid where \(h(y)=0\). Those values must be considered in the original equation. If \(h(r)=0\), then the constant function \(y(x)=r\) satisfies \(y'=g(x)h(y)\), because both sides are zero. Such a constant solution is called an equilibrium solution.
For trigonometric \(h\), these values usually repeat periodically. For example, \(h(y)=\sin y\) has zeros at \(k\pi\), while \(h(y)=\cos y\) has zeros at \(\pi/2+k\pi\). The nonconstant formulas obtained by division do not include these equilibria.
There is also a useful branch interpretation. When \(g\) is continuous and \(h\) is locally Lipschitz, the right-hand side \(g(x)h(y)\) is locally Lipschitz in \(y\), so the local uniqueness theorem applies. Trigonometric functions are continuously differentiable and therefore locally Lipschitz. Under these conditions, a solution that reaches an equilibrium value agrees locally with the constant solution through that point; it cannot pass through the equilibrium and continue as a different solution. A nonconstant solution consequently stays in one connected component of \(\{y:h(y)\ne0\}\) on its interval of existence. Such a component need not be bounded in other equations, but for sine and cosine it is an interval between consecutive zeros.
Worked Example: Retaining Equilibria for \(y'=\sin(2y)\)
The factor \(\sin(2y)\) vanishes at \(y=k\pi/2\), so every constant \(y(x)=k\pi/2\) is an equilibrium solution. To find a nonconstant solution with \(y(0)=\pi/4\), use the branch \((0,\pi/2)\), where \(\sin(2y)\ne0\). Separate and integrate:
At \(x=0\), \(y=\pi/4\), and \(\tan(\pi/4)=1\), so \(C=0\). In this branch \(\tan y>0\), and thus \(\tan y=e^{2x}\). The branch-compatible solution is
It satisfies \(y(0)=\arctan(1)=\pi/4\). Set \(z=e^{2x}\); then \(z'=2z\), and
So the nonconstant solution checks, while the separate constant solutions remain part of the full solution set.
A Common Mistake: Dividing at an Equilibrium
For \(y'=\sin y\), dividing by \(\sin y\) and integrating can produce nonconstant solutions on intervals that avoid \(k\pi\). But it does not produce \(y(x)=0\). A mistaken conclusion would be: “Every solution is obtained by dividing by \(\sin y\), so there is no solution \(y=0\).” The division itself assumes \(\sin y\ne0\), and therefore cannot be used to reject a function where \(\sin y=0\).
The correction is to test the excluded values in the original equation. For \(y(x)=0\), \(y'=0\) and \(\sin 0=0\), so the equation holds. More generally, test every value \(r\) satisfying \(h(r)=0\) by substituting the constant function \(y(x)=r\) into the original equation.
Check Your Understanding
Use branch restrictions as well as algebra when answering these questions.
- For \(y'=g(x)\sin y\), at which values of \(y\) does division by \(\sin y\) fail?
- Why is \(\ln|\tan(y/2)|\) a valid antiderivative of \(\csc y\) only on intervals where \(\sin y\ne0\)?
- For \(y'=x\cos y\), which branch interval contains a solution with initial value \(y(0)=0\)?
- What must be checked in the original equation after a separated equation has been divided by \(h(y)\)?
- Differentiate \(y(x)=\arctan(e^{2x})\) and verify that it solves \(y'=\sin(2y)\).