Tutorials › Calculus II › Deriving Recurrences for Exponential-Trigonometric Moments

Repeated and Tabular Parts · Tutorial 67 of 998

Deriving Recurrences for Exponential-Trigonometric Moments

Use integration by parts to reduce each pair of exponential-trigonometric moments of degree n to moments of degree n−1, with the boundary terms and signs made explicit.

Intermediate 10 min read

What You'll Learn

  • Define anchored sine and cosine moments for nonnegative integer degrees.
  • Identify when the coupled recurrence is valid and handle the zero-parameter case.
  • Derive both recurrence formulas from integration by parts.
  • Compute moments by starting with degree zero and reducing the degree.
  • Check recurrence results by differentiating them.
  • Recognize and correct a common sign error in the sine recurrence.

Why Couple the Sine and Cosine Moments?

Integrals involving a polynomial, an exponential, and a trigonometric factor combine two useful patterns: differentiating a power of \(x\) lowers its degree, while integrating an exponential times a sine or cosine preserves the same exponential-trigonometric form. Integration by parts can therefore reduce a moment of degree \(n\) to moments of degree \(n-1\).

The sine and cosine integrals do not generally reduce independently. Integrating either exponential-trigonometric factor produces a combination of both sine and cosine. The resulting formulas are a coupled pair: to compute one moment at degree \(n\), we need both moments at the lower degree.

Define the Moments and Their Conditions

Let \(a,b\in\mathbb R\), let \(n\) be a nonnegative integer, and let \(x\in\mathbb R\). We use moments anchored at zero; when \(x<0\), the integral is understood as an oriented definite integral.

Definition: The degree-\(n\) exponential-cosine and exponential-sine moments are
$$ C_n(x)=\int_0^x t^n e^{at}\cos(bt)\,dt, \qquad S_n(x)=\int_0^x t^n e^{at}\sin(bt)\,dt. $$

The integration variable is \(t\), while \(x\) is the upper endpoint. This distinction helps keep the boundary terms in the recurrence clear. The formulas below use the positive quantity \(D=a^2+b^2\), so they apply when \(a\) and \(b\) are not both zero. The case \(a=b=0\) is stated separately.

The Coupled Recurrence

Theorem: If \(a^2+b^2>0\) and \(n\ge 1\), then
$$ C_n(x) = \frac{x^n e^{ax}\bigl(a\cos(bx)+b\sin(bx)\bigr)}{a^2+b^2} -\frac{n}{a^2+b^2} \bigl(aC_{n-1}(x)+bS_{n-1}(x)\bigr), $$
and
$$ S_n(x) = \frac{x^n e^{ax}\bigl(a\sin(bx)-b\cos(bx)\bigr)}{a^2+b^2} -\frac{n}{a^2+b^2} \bigl(aS_{n-1}(x)-bC_{n-1}(x)\bigr). $$

Each formula contains a boundary term at \(x\) and a linear combination of moments of degree \(n-1\). There is no additional boundary term at zero because \(n\ge1\) makes \(0^n=0\).

To start the recurrence, evaluate the degree-zero moments directly:

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

These base formulas are valid under the same condition \(a^2+b^2>0\). In the exceptional case \(a=b=0\), the cosine integrand is \(t^n\) and the sine integrand is zero, so \(C_n(x)=x^{n+1}/(n+1)\) and \(S_n(x)=0\).

Why the Recurrence Works

For \(D=a^2+b^2>0\), define the two exponential-trigonometric expressions

$$ V_C(t)=\frac{e^{at}\bigl(a\cos(bt)+b\sin(bt)\bigr)}{D}, \qquad V_S(t)=\frac{e^{at}\bigl(a\sin(bt)-b\cos(bt)\bigr)}{D}. $$

Differentiating gives \(V_C'(t)=e^{at}\cos(bt)\) and \(V_S'(t)=e^{at}\sin(bt)\). For instance, in the first derivative the sine terms cancel, while the cosine terms combine to \(a^2+b^2\). Thus these expressions are antiderivatives of the corresponding exponential-trigonometric factors.

1
Apply integration by parts to the cosine moment.
Use \(u=t^n\), \(dv=e^{at}\cos(bt)\,dt\), so \(du=nt^{n-1}\,dt\) and \(v=V_C(t)\).
2
Include both endpoint contributions.
Integration by parts gives \(\int_0^x t^n\,dv=[t^nV_C(t)]_0^x-n\int_0^x t^{n-1}V_C(t)\,dt\). The lower endpoint is zero because \(n\ge1\).
3
Separate the lower-degree moments.
Substitute \(V_C\) and use linearity: \(\int_0^x t^{n-1}e^{at}(a\cos(bt)+b\sin(bt))\,dt=aC_{n-1}(x)+bS_{n-1}(x)\). This gives the stated formula for \(C_n\).
4
Repeat for the sine moment.
Use \(u=t^n\), \(dv=e^{at}\sin(bt)\,dt\), and \(v=V_S(t)\). The remaining integral is \(aS_{n-1}(x)-bC_{n-1}(x)\), giving the stated formula for \(S_n\).

This derivation explains why the degree drops by one and why the moments are coupled. The derivative of the polynomial factor supplies the factor \(n\), and the antiderivative of each exponential-trigonometric factor mixes sine and cosine.

Worked Example: Degree One When \(a=b=1\)

Worked Example: Degree One When \(a=b=1\)

Here \(D=1^2+1^2=2\). The base moments are

$$ C_0(x)=\frac{e^x(\cos x+\sin x)-1}{2}, \qquad S_0(x)=\frac{e^x(\sin x-\cos x)+1}{2}. $$

For the cosine moment, the recurrence gives

$$ \begin{aligned} C_1(x) &=\frac{x e^x(\cos x+\sin x)}{2} -\frac{C_0(x)+S_0(x)}{2}\\ &=\frac{x e^x(\cos x+\sin x)}{2} -\frac{e^x\sin x}{2}\\ &=\frac{e^x\bigl(x(\cos x+\sin x)-\sin x\bigr)}{2}. \end{aligned} $$

For the sine moment, first compute \(S_0-C_0=1-e^x\cos x\). Therefore

$$ \begin{aligned} S_1(x) &=\frac{x e^x(\sin x-\cos x)}{2} -\frac{S_0(x)-C_0(x)}{2}\\ &=\frac{e^x\bigl(x(\sin x-\cos x)+\cos x\bigr)}{2}-\frac12. \end{aligned} $$

To check the cosine result, differentiate its numerator using the product rule. The terms simplify as follows:

$$ \frac{d}{dx}\left[ \frac{e^x\bigl(x(\cos x+\sin x)-\sin x\bigr)}{2} \right] = \frac{e^x(2x\cos x)}{2} =x e^x\cos x. $$

Likewise, differentiating \(S_1\) gives \(x e^x\sin x\). Both derivatives match their defining integrands, and both expressions equal zero at \(x=0\), as required by the lower endpoint.

Worked Example: Reducing Degree Two for Sine and Cosine

Worked Example: Reducing Degree Two for Sine and Cosine

Take \(a=0\) and \(b=1\), so \(D=1\). The degree-zero moments are \(C_0(x)=\sin x\) and \(S_0(x)=1-\cos x\). At degree one, the recurrences give

$$ \begin{aligned} C_1(x)&=x\sin x-S_0(x)=x\sin x+\cos x-1,\\ S_1(x)&=-x\cos x+C_0(x)=-x\cos x+\sin x. \end{aligned} $$

Now reduce degree two:

$$ \begin{aligned} C_2(x)&=x^2\sin x-2S_1(x) =x^2\sin x+2x\cos x-2\sin x,\\ S_2(x)&=-x^2\cos x+2C_1(x) =-x^2\cos x+2x\sin x+2\cos x-2. \end{aligned} $$

Differentiate each result to check it. For the cosine moment,

$$ \frac{d}{dx}\bigl(x^2\sin x+2x\cos x-2\sin x\bigr) =2x\sin x+x^2\cos x+2\cos x-2x\sin x-2\cos x =x^2\cos x. $$

For the sine moment,

$$ \frac{d}{dx}\bigl(-x^2\cos x+2x\sin x+2\cos x-2\bigr) =-2x\cos x+x^2\sin x+2\sin x+2x\cos x-2\sin x =x^2\sin x. $$

The expressions also vanish at zero, confirming the anchored values.

Worked Example: Degree One When \(a=1\) and \(b=2\)

Worked Example: Degree One When \(a=1\) and \(b=2\)

Now \(D=1^2+2^2=5\). Write \(c=\cos(2x)\) and \(s=\sin(2x)\) temporarily. The base moments are

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

The degree-one cosine recurrence requires \(C_0+2S_0\). Directly combining the base formulas gives \(C_0+2S_0=[e^x(-3c+4s)+3]/5\). Hence

$$ C_1(x)=\frac{e^x\bigl(5x(c+2s)+3c-4s\bigr)}{25}-\frac{3}{25}. $$

Similarly, \(S_0-2C_0=[e^x(-4c-3s)+4]/5\), so

$$ S_1(x)=\frac{e^x\bigl(5x(s-2c)+4c+3s\bigr)}{25}-\frac{4}{25}. $$

For the cosine check, differentiating the expression inside the exponential product and adding it to that expression gives \(25x c\). Thus \(C_1'(x)=e^x(25x c)/25=x e^x\cos(2x)\). For the sine check, the corresponding sum is \(25x s\), giving \(S_1'(x)=x e^x\sin(2x)\). At \(x=0\), the expressions give zero because \(c=1\), \(s=0\), and the constants cancel. Both results therefore pass the derivative and endpoint checks.

A Common Sign Error

The sine recurrence contains \(aS_{n-1}-bC_{n-1}\), not \(aS_{n-1}+bC_{n-1}\). The minus sign comes from the cosine term \(-b\cos(bt)\) in the antiderivative of \(e^{at}\sin(bt)\).

For a concrete check, use \(a=b=1\) and \(n=1\). Replacing the minus sign by a plus would incorrectly give \(S_1(x)=x e^x(\sin x-\cos x)/2-(S_0+C_0)/2=e^x\bigl(x(\sin x-\cos x)-\sin x\bigr)/2\). Differentiating this wrong expression gives \(e^x(x\sin x-\cos x)\), not \(x e^x\sin x\). The corrected recurrence uses \(S_0-C_0\) and gives the verified sine moment from the first example.

Using the Recurrence Effectively

For a degree \(n\) moment, the practical sequence is to compute the degree-zero pair, then use the coupled formulas to obtain degrees one through \(n\). At every stage, keep both the sine and cosine moments: discarding one generally leaves the recurrence incomplete. These relations are useful when the degree is larger than one because they organize repeated integration by parts into a predictable reduction rather than requiring a new calculation from the beginning.

The formulas are for moments anchored at zero. An indefinite antiderivative can be obtained from a moment expression by adding an arbitrary constant. If a different lower endpoint is used, its boundary contribution must also be included; it does not generally vanish. Keeping the endpoint convention explicit prevents a correct recurrence from being mistaken for an equality between unspecified antiderivatives.

Check Your Understanding

Use the recurrence and the stated conditions to answer these questions.

  1. For what values of \(a\) and \(b\) can the displayed recurrence be used with denominator \(a^2+b^2\)?
  2. Why is there no lower-endpoint term at zero when \(n\ge1\)?
  3. Write the recurrence for \(C_2(x)\) in terms of \(C_1(x)\), \(S_1(x)\), and the degree-two boundary term.
  4. In the sine recurrence, what is the sign in front of \(bC_{n-1}(x)\), and which antiderivative produces it?
  5. What are \(C_n(x)\) and \(S_n(x)\) when \(a=b=0\)?

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