Tutorials › Calculus I › Trigonometric Separable Equations

Slope Fields and Separable Equations · Tutorial 1371 of 1495

Trigonometric Separable Equations

Separate trigonometric differential equations carefully, track the correct periodic branch, and check both nonconstant and equilibrium solutions.

Intermediate 11 min read

What You'll Learn

  • Separate equations whose dependent-variable factor is trigonometric
  • Use standard trigonometric antiderivatives on intervals where they apply
  • Understand why separated solutions are restricted to branches
  • Apply initial conditions to select a branch and integration constant
  • Identify equilibrium solutions excluded by division
  • Verify proposed solutions by differentiation

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.

Definition: A branch interval for \(h\) is a connected component of the set of values \(y\) for which \(h(y)\ne 0\). On such an interval, \(1/h(y)\) is defined and has a fixed sign.

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.

IntegrandAntiderivativeRestriction
\(\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\).

$$ \frac{d}{dx}H(y(x)) =H'(y(x))y'(x) =\frac{1}{h(y(x))}g(x)h(y(x)) =g(x). $$

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.

Theorem: On an interval where \(h(y)\ne0\), a differentiable function \(y(x)\) solves \(y'=g(x)h(y)\) if and only if \(H(y(x))=G(x)+C\), where \(H'=1/h\), \(G'=g\), and the values of \(y\) stay in that interval.

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:

$$ \frac{dy}{\sin y}=2x\,dx, \qquad \int\csc y\,dy=\int 2x\,dx, \qquad \ln|\tan(y/2)|=x^2+C. $$

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

$$ y(x)=2\arctan(e^{x^2}). $$

Check the initial value: \(y(0)=2\arctan(1)=\pi/2\). For the differential equation, set \(z=e^{x^2}\); then \(z'=2xz\), and

$$ y'=\frac{2z'}{1+z^2} =\frac{4xz}{1+z^2}, \qquad 2x\sin y =2x\sin(2\arctan z) =\frac{4xz}{1+z^2}. $$

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:

$$ \sec y\,dy=x\,dx, \qquad \ln|\sec y+\tan y|=\frac{x^2}{2}+C. $$

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

$$ \tan\left(\frac{\pi}{4}+\frac{y}{2}\right)=e^{x^2/2}, \qquad y=2\arctan(e^{x^2/2})-\frac{\pi}{2}. $$

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

$$ y'=\frac{2xz}{1+z^2}, \qquad \cos y =\cos(2\arctan z-\pi/2) =\sin(2\arctan z) =\frac{2z}{1+z^2}. $$

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:

$$ \csc(2y)\,dy=dx, \qquad \frac12\ln|\tan y|=x+C. $$

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

$$ y(x)=\arctan(e^{2x}). $$

It satisfies \(y(0)=\arctan(1)=\pi/4\). Set \(z=e^{2x}\); then \(z'=2z\), and

$$ y'=\frac{2z}{1+z^2}, \qquad \sin(2y)=\frac{2\tan y}{1+\tan^2 y} =\frac{2z}{1+z^2}. $$

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.

Key takeaway: Separate and integrate only on intervals where the trigonometric factor is nonzero. Then check its zeros separately, choose the inverse-trigonometric branch matching the solution interval, and verify the result in the original differential equation.

Check Your Understanding

Use branch restrictions as well as algebra when answering these questions.

  1. For \(y'=g(x)\sin y\), at which values of \(y\) does division by \(\sin y\) fail?
  2. Why is \(\ln|\tan(y/2)|\) a valid antiderivative of \(\csc y\) only on intervals where \(\sin y\ne0\)?
  3. For \(y'=x\cos y\), which branch interval contains a solution with initial value \(y(0)=0\)?
  4. What must be checked in the original equation after a separated equation has been divided by \(h(y)\)?
  5. Differentiate \(y(x)=\arctan(e^{2x})\) and verify that it solves \(y'=\sin(2y)\).

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon