Tutorials › AP Statistics › Separable Equations with Trigonometric Factors

Separable Equations and Growth · Tutorial 574 of 999

Separable Equations with Trigonometric Factors

Separate and solve differential equations with trigonometric factors while preserving the domain conditions that make each solution valid.

Intermediate 10 min read

What You'll Learn

  • Separate equations whose dependent-variable factor is sine or cosine
  • Integrate secant and cosecant factors correctly
  • Use initial conditions to determine constants in implicit solutions
  • Identify intervals where division by a trigonometric factor is valid
  • Check proposed solutions by differentiation and substitution

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.

Key idea: Separate and integrate on intervals where every divisor is nonzero. Keep the resulting domain restriction visible, and check separately any cases excluded by division.

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:

$$ \int \sec y\,dy=\ln|\sec y+\tan y|+C. $$

To see why, differentiate the expression inside the logarithm. Wherever \(\cos y\ne 0\),

$$ \frac{d}{dy}(\sec y+\tan y) =\sec y\tan y+\sec^2 y =\sec y(\tan y+\sec y). $$

Therefore, using \(\frac{d}{dy}\ln|u|=u'/u\) when \(u\ne 0\),

$$ \frac{d}{dy}\ln|\sec y+\tan y|=\sec y. $$

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.

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

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:

$$ \frac{y'}{\cos y}=x. $$

Since \(y'=\frac{dy}{dx}\), multiply by \(dx\) to separate the variables:

$$ \sec y\,dy=x\,dx. $$

Integrate each side, using \(\int \sec y\,dy=\ln|\sec y+\tan y|+C\) and \(\int x\,dx=x^2/2+C\):

$$ \ln|\sec y+\tan y|=\frac{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\):

$$ \sec y\,y'=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\):

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

Apply \(x=0\) and \(y=0\). Since \(\sec 0=1\) and \(\tan 0=0\),

$$ \ln|1+0|=0+C, \qquad 0=C. $$

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

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

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

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

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

$$ y'=\frac{2u'}{1+u^2} =\frac{2xu}{1+u^2}. $$

Also, since \(y=2\arctan u-\pi/2\),

$$ \cos y =\sin(2\arctan u) =\frac{2u}{1+u^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

$$ \int \csc y\,dy=\ln\left|\tan\left(\frac{y}{2}\right)\right|+C. $$

This formula can be checked by differentiating. Wherever the logarithm is defined,

$$ \frac{d}{dy}\ln\left|\tan\left(\frac{y}{2}\right)\right| =\frac{1}{2\sin(y/2)\cos(y/2)} =\frac{1}{\sin y} =\csc y. $$

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:

$$ \csc y\,dy=x\,dx. $$

Integrate both sides:

$$ \ln\left|\tan\left(\frac{y}{2}\right)\right| =\frac{x^2}{2}+C. $$

Use \(x=0\), \(y=\pi/2\). Since \(\tan(\pi/4)=1\),

$$ \ln|1|=0+C, \qquad C=0. $$

For \(0<y<\pi\), \(\tan(y/2)>0\), so remove the absolute value and exponentiate:

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

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

$$ y'=\frac{2u'}{1+u^2}=\frac{2xu}{1+u^2}. $$

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.

1
Identify the divisor.
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\).
2
Integrate on an admissible interval.
Use the appropriate trigonometric antiderivative and retain the integration constant.
3
Apply the initial condition, if given.
Substitute the specified \(x\) and \(y\) values into the integrated relation before rearranging it.
4
Check the result.
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

$$ \frac{y'}{\cos y}=x $$

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.

Takeaway: For cosine factors, the separated integral commonly involves \(\ln|\sec y+\tan y|\). For sine factors, it commonly involves \(\ln|\tan(y/2)|\). In either case, the original equation—not the divided equation—decides whether excluded values also give solutions.

Check Your Understanding

For each question, state any condition needed for the separation step before integrating.

  1. Separate and integrate \(y'=3x\cos y\), giving an implicit solution on an interval where division is valid.
  2. For \(y'=x\sin y\), what condition on \(y\) is required before dividing by \(\sin y\)?
  3. Apply \(y(0)=0\) to the implicit family \(\ln|\sec y+\tan y|=x^2/2+C\) and find \(C\).
  4. Why must a solution derived by dividing by \(\cos y\) be checked against the original equation at values where \(\cos y=0\)?
  5. Differentiate \(\ln|\tan(y/2)|\) with respect to \(y\) and identify the trigonometric function obtained.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: 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