Tutorials › Calculus II › Deriving the Coupled Sine-Cosine Integral Equations

Repeated and Tabular Parts · Tutorial 62 of 998

Deriving the Coupled Sine-Cosine Integral Equations

See how two integrations by parts turn exponential-trigonometric integrals into a coupled linear system, then solve and verify that system.

Intermediate 9 min read

What You'll Learn

  • Set up the sine and cosine integrals with a fixed lower endpoint.
  • Derive both equations by integration by parts and track their signs.
  • Write the equations as a two-by-two linear system.
  • Solve the system using its determinant and inverse matrix.
  • Handle the cases where the exponential rate or frequency is zero.
  • Check solutions by substitution and differentiation.

Why the Two Integrals Belong Together

When an exponential is multiplied by a sine or cosine, integration by parts does not usually make the integral disappear after one step. Instead, it transforms the sine integral into a cosine integral, and the cosine integral back into a sine integral. The useful idea is to keep track of both integrals at once.

This tutorial derives that pair of equations, solves the resulting two-by-two system, and checks the reasoning with examples. Using definite integrals first makes the boundary terms explicit and avoids ambiguity from constants of integration.

Definition: For real numbers \(a,b\), a fixed lower endpoint \(r\), and a variable endpoint \(x\), define $$ S_r(x)=\int_r^x e^{at}\sin(bt)\,dt, \qquad C_r(x)=\int_r^x e^{at}\cos(bt)\,dt. $$ The variable \(t\) is the integration variable; \(x\) is the endpoint.

Deriving the Coupled Equations

First suppose \(a\ne 0\), so an antiderivative of \(e^{at}\) is \(e^{at}/a\). Apply integration by parts to \(S_r(x)\), taking \(u=\sin(bt)\) and \(dv=e^{at}\,dt\). Then \(du=b\cos(bt)\,dt\) and \(v=e^{at}/a\). The definite integration-by-parts formula gives

$$ \begin{aligned} S_r(x) &=\left[\frac{e^{at}\sin(bt)}{a}\right]_r^x -\frac{b}{a}\int_r^x e^{at}\cos(bt)\,dt\\ &=\frac{e^{ax}\sin(bx)-e^{ar}\sin(br)}{a} -\frac{b}{a}C_r(x). \end{aligned} $$

For the cosine integral, take \(u=\cos(bt)\) and \(dv=e^{at}\,dt\). In this case \(du=-b\sin(bt)\,dt\), so the minus sign in integration by parts combines with the minus sign in \(du\) to give a plus:

$$ \begin{aligned} C_r(x) &=\left[\frac{e^{at}\cos(bt)}{a}\right]_r^x +\frac{b}{a}\int_r^x e^{at}\sin(bt)\,dt\\ &=\frac{e^{ax}\cos(bx)-e^{ar}\cos(br)}{a} +\frac{b}{a}S_r(x). \end{aligned} $$

Multiplying both equations by \(a\) puts them in a form that can be solved together. Define the boundary expressions

$$ P=e^{ax}\sin(bx)-e^{ar}\sin(br), \qquad Q=e^{ax}\cos(bx)-e^{ar}\cos(br). $$

The two integration-by-parts identities become

$$ aS_r(x)+bC_r(x)=P, \qquad -bS_r(x)+aC_r(x)=Q. $$

These are the coupled sine-cosine integral equations. Neither equation alone determines both unknown integrals. Together, however, they form a linear system.

Solving the System

In matrix form, the equations are

$$ \begin{pmatrix} a&b\\ -b&a \end{pmatrix} \begin{pmatrix} S_r(x)\\ C_r(x) \end{pmatrix} = \begin{pmatrix} P\\ Q \end{pmatrix}. $$

The determinant of the coefficient matrix is \(a^2+b^2\). If \(a\) and \(b\) are not both zero, this determinant is positive, so the system has a unique solution. The inverse matrix and the resulting integrals are

$$ \begin{pmatrix} a&b\\ -b&a \end{pmatrix}^{-1} = \frac{1}{a^2+b^2} \begin{pmatrix} a&-b\\ b&a \end{pmatrix}, \qquad S_r(x)=\frac{aP-bQ}{a^2+b^2}, \qquad C_r(x)=\frac{bP+aQ}{a^2+b^2}. $$

To see why this inverse is correct, multiply the coefficient matrix by the displayed numerator matrix. The diagonal entries are \(a^2+b^2\), while each off-diagonal entry is zero. Dividing by \(a^2+b^2\) therefore gives the identity matrix.

Substituting \(P\) and \(Q\) into the solution gives the definite-integral formulas directly:

$$ \begin{aligned} S_r(x) &=\frac{e^{ax}\bigl(a\sin(bx)-b\cos(bx)\bigr) -e^{ar}\bigl(a\sin(br)-b\cos(br)\bigr)} {a^2+b^2},\\[4pt] C_r(x) &=\frac{e^{ax}\bigl(b\sin(bx)+a\cos(bx)\bigr) -e^{ar}\bigl(b\sin(br)+a\cos(br)\bigr)} {a^2+b^2}. \end{aligned} $$

Here the formulas are derived for \(a\ne0\), as required by the integration-by-parts choice \(v=e^{at}/a\). If \(a=0\) and \(b\ne0\), direct integration of the sine and cosine gives the same formulas. If both \(a=0\) and \(b=0\), the determinant vanishes and the two integrands are simply \(0\) and \(1\), respectively; the integrals are \(S_r(x)=0\) and \(C_r(x)=x-r\).

A Complete Derivation as a Sequence

1
Name both integrals.
Use \(S_r(x)\) for the sine integral and \(C_r(x)\) for the cosine integral, with the same limits.
2
Integrate by parts twice.
The sine integral produces the cosine integral, and the cosine integral produces the sine integral. Keep the boundary terms and signs.
3
Arrange the equations together.
Multiply through by \(a\) to obtain \(aS+bC=P\) and \(-bS+aC=Q\).
4
Check the determinant and solve.
When \(a^2+b^2\ne0\), invert the coefficient matrix to obtain both integrals.

This method works because the two integrations by parts create a closed pair: no new type of integral appears. The original unknowns recur linearly, and the determinant tells us exactly when the pair can be solved uniquely.

Worked Examples

Worked Example: \(e^t\sin(2t)\) and \(e^t\cos(2t)\) from \(0\) to \(\pi/2\)

Here \(a=1\), \(b=2\), \(r=0\), and \(x=\pi/2\). Calculate the boundary expressions first. At the upper endpoint, \(\sin(2x)=\sin\pi=0\) and \(\cos(2x)=\cos\pi=-1\). At the lower endpoint, \(\sin0=0\) and \(\cos0=1\). Thus

$$P=0-0=0,\qquad Q=-e^{\pi/2}-1.$$

Wait: the upper endpoint in this example is \(x=\pi/2\), so \(bx=2(\pi/2)=\pi\). Therefore \(P=0\), not \(e^{\pi/2}\). The system is

$$S_0+2C_0=0,\qquad -2S_0+C_0=-e^{\pi/2}-1.$$

The determinant is \(1^2+2^2=5\). Solving by the inverse-matrix formulas gives

$$ S_0=\frac{1(0)-2(-e^{\pi/2}-1)}{5} =\frac{2e^{\pi/2}+2}{5}, \qquad C_0=\frac{2(0)+1(-e^{\pi/2}-1)}{5} =-\frac{e^{\pi/2}+1}{5}. $$

Check by substitution: \(S_0+2C_0=(2e^{\pi/2}+2-2e^{\pi/2}-2)/5=0=P\). Also, \(-2S_0+C_0=(-4e^{\pi/2}-4-e^{\pi/2}-1)/5=-e^{\pi/2}-1=Q\), as required.

Worked Example: \(e^{2t}\sin(t)\) and \(e^{2t}\cos(t)\) from \(0\) to \(\pi\)

Take \(a=2\), \(b=1\), \(r=0\), and \(x=\pi\). Since \(\sin\pi=\sin0=0\), and \(\cos\pi=-1\), \(\cos0=1\), the boundary values are

$$P=0,\qquad Q=-e^{2\pi}-1.$$

The system is \(2S_0+C_0=0\) and \(-S_0+2C_0=-e^{2\pi}-1\). Its determinant is \(2^2+1^2=5\). Therefore

$$ S_0=\frac{2(0)-1(-e^{2\pi}-1)}{5} =\frac{e^{2\pi}+1}{5}, \qquad C_0=\frac{1(0)+2(-e^{2\pi}-1)}{5} =-\frac{2(e^{2\pi}+1)}{5}. $$

Substitution checks both answers: \(2S_0+C_0=(2e^{2\pi}+2-2e^{2\pi}-2)/5=0=P\), and \(-S_0+2C_0=-(e^{2\pi}+1)/5-4(e^{2\pi}+1)/5=-e^{2\pi}-1=Q\).

Worked Example: The zero-rate case \(\int_0^{\pi/6}\sin(3t)\,dt\) and \(\int_0^{\pi/6}\cos(3t)\,dt\)

Now \(a=0\), \(b=3\), \(r=0\), and \(x=\pi/6\). The earlier integration-by-parts derivation using \(e^{at}/a\) does not apply, because \(a=0\). But the coupled system can still be used: its coefficient matrix has determinant \(0^2+3^2=9\), which is nonzero. The boundary expressions are

$$ P=\sin(\pi/2)-\sin0=1,\qquad Q=\cos(\pi/2)-\cos0=-1. $$

The equations become \(3C_0=1\) and \(-3S_0=-1\). Hence \(S_0=1/3\) and \(C_0=1/3\). Check directly by integration: \(\int_0^{\pi/6}\sin(3t)\,dt=[-\cos(3t)/3]_0^{\pi/6}=(0+1)/3=1/3\), and \(\int_0^{\pi/6}\cos(3t)\,dt=[\sin(3t)/3]_0^{\pi/6}=(1-0)/3=1/3\). Both agree with the system's solution.

Why the Conditions and Signs Matter

The determinant condition is not a technical detail to skip. Division by \(a^2+b^2\) is valid only when \(a\) and \(b\) are not both zero. For \(a=0,b\ne0\), the system remains invertible even though the particular integration-by-parts derivation using \(e^{at}/a\) cannot be used; direct elementary integration handles that case. When \(a=b=0\), the matrix is singular and the integrals must be evaluated from their integrands instead.

Common pitfall: The cosine integration-by-parts equation has a plus sign in front of \(bS_r/a\), because \(d(\cos(bt))=-b\sin(bt)\,dt\) and the integration-by-parts formula subtracts the integral involving \(du\). A sign error changes the coefficient matrix and gives an incorrect solution.

For example, a mistaken calculation might write \(C_r=Q/a-(b/a)S_r\), which rearranges to \(bS_r+aC_r=Q\). The correct relation is \(C_r=Q/a+(b/a)S_r\), which rearranges to \(-bS_r+aC_r=Q\). The reliable check is to substitute \(du=-b\sin(bt)\,dt\) into \(\int u\,dv=[uv]-\int v\,du\) before simplifying.

Checking the Solved Expressions

There is a useful final check beyond substitution into the linear equations. For fixed \(r\), the solved expression for \(S_r(x)\) is a function of the upper endpoint. Differentiating it should recover \(e^{ax}\sin(bx)\), because the derivative of \(\int_r^x e^{at}\sin(bt)\,dt\) is its integrand. For instance, the nonconstant part of that expression is

$$ F(x)=\frac{e^{ax}\bigl(a\sin(bx)-b\cos(bx)\bigr)}{a^2+b^2}. $$

Using the product rule, the numerator's derivative is \(e^{ax}\bigl(a^2\sin(bx)-ab\cos(bx)+ab\cos(bx)+b^2\sin(bx)\bigr)\). The cosine terms cancel, leaving \(e^{ax}(a^2+b^2)\sin(bx)\). Dividing by \(a^2+b^2\) gives \(F'(x)=e^{ax}\sin(bx)\). The corresponding cosine expression differentiates to \(e^{ax}\cos(bx)\) by the same product-rule calculation. This confirms that the solved expressions are consistent with the original integrands.

The central strategy is therefore not to repeat integration by parts indefinitely. Name both integrals, derive both equations, check the determinant, and solve the pair. Keeping the boundary terms visible and verifying the signs makes the method dependable.

Check Your Understanding

Use the coupled-equation method and show the key algebra in each response.

  1. For general \(a\ne0\), derive the equation for \(S_r(x)\) by choosing \(u=\sin(bt)\) and \(dv=e^{at}\,dt\).
  2. Write the coefficient matrix for the coupled system and calculate its determinant.
  3. For \(a=1\), \(b=1\), \(r=0\), and \(x=\pi/2\), calculate \(P\) and \(Q\), then solve for \(S_0(x)\) and \(C_0(x)\).
  4. Explain why the integration-by-parts derivation using \(e^{at}/a\) does not cover \(a=0\), even though the matrix may still be invertible.
  5. Differentiate \(e^{ax}(a\sin(bx)-b\cos(bx))/(a^2+b^2)\) and verify the sine integrand is recovered when \(a^2+b^2\ne0\).

Test yourself: Calculus II 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