Tutorials › Calculus II › Polynomial-Weighted Cyclic Integrals on Finite Intervals

Repeated and Tabular Parts · Tutorial 70 of 998

Polynomial-Weighted Cyclic Integrals on Finite Intervals

Learn how to reduce and evaluate polynomial-weighted exponential-sine and exponential-cosine integrals on finite intervals, including their endpoint terms and parameter conditions.

Intermediate 9 min read

What You'll Learn

  • Find the cyclic antiderivatives of exponential-sine and exponential-cosine products.
  • Derive formulas for the definite integrals with a linear factor x.
  • Track both endpoint contributions when applying integration by parts.
  • Apply the formulas for arbitrary real parameters a and b, including the degenerate case.
  • Check results by differentiating the antiderivative and evaluating both bounds.
  • Recognize and correct a common sign error in the cyclic step.

Why the Finite-Interval Form Matters

An integral such as \(\int_L^U x e^{ax}\sin(bx)\,dx\) combines three features: a polynomial factor, exponential growth or decay, and oscillation. The linear factor calls for integration by parts, while the sine and cosine terms are linked when differentiated or integrated. Treating those trigonometric integrals as a pair produces a compact method that works for any finite endpoints.

For a definite integral, the endpoints are part of the calculation, not an afterthought. In particular, the factor \(x\) means the upper and lower boundary terms need not disappear even when one endpoint is zero. We will keep those terms explicit and use the resulting antiderivatives to evaluate both the sine-weighted and cosine-weighted cases.

Definition: For finite real numbers \(L\le U\) and real parameters \(a,b\), a polynomial-weighted cyclic integral here means a definite integral of \(x e^{ax}\sin(bx)\) or \(x e^{ax}\cos(bx)\) over \([L,U]\). The word “cyclic” refers to the way integration of the exponential-sine and exponential-cosine pair brings the two functions back into one another.

The Paired Antiderivatives

Write \(D=a^2+b^2\). When \(D>0\), equivalently when \(a\) and \(b\) are not both zero, define

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

A product-rule differentiation gives \(S_0'(x)=e^{ax}\sin(bx)\) and \(C_0'(x)=e^{ax}\cos(bx)\). These are the paired antiderivatives for the exponential-sine and exponential-cosine terms. Integrating those antiderivatives once more gives the useful cyclic identities

$$ \frac{aS_0-bC_0}{D}\ \text{is an antiderivative of }S_0, \qquad \frac{aC_0+bS_0}{D}\ \text{is an antiderivative of }C_0. $$

For example, the derivative of \((aS_0-bC_0)/D\) is \[ \frac{a e^{ax}\sin(bx)-b e^{ax}\cos(bx)}{D}=S_0(x). \] Similarly, the derivative of \((aC_0+bS_0)/D\) is \(C_0(x)\). The two antiderivatives are coupled: integrating the sine expression involves both \(S_0\) and \(C_0\), and integrating the cosine expression does too.

Deriving the Linear-Weight Formulas

Apply integration by parts to \(x e^{ax}\sin(bx)\), taking \(u=x\) and \(dv=e^{ax}\sin(bx)\,dx\). Then \(du=dx\) and \(v=S_0(x)\). Thus an antiderivative is \(xS_0-\int S_0\,dx\). The cyclic identity above evaluates the remaining integral. The cosine case follows by taking \(v=C_0(x)\) instead.

Theorem: If \(a,b\in\mathbb R\) and \(D=a^2+b^2>0\), define $$ F_s(x)=xS_0(x)-\frac{aS_0(x)-bC_0(x)}{D}, \qquad F_c(x)=xC_0(x)-\frac{aC_0(x)+bS_0(x)}{D}. $$ Then \(F_s'(x)=x e^{ax}\sin(bx)\) and \(F_c'(x)=x e^{ax}\cos(bx)\). Consequently, for finite \(L\le U\), $$ \int_L^U x e^{ax}\sin(bx)\,dx=F_s(U)-F_s(L), \qquad \int_L^U x e^{ax}\cos(bx)\,dx=F_c(U)-F_c(L). $$

The derivative check is also the reason the method works. For the sine case, differentiating \(xS_0\) gives \(S_0+x e^{ax}\sin(bx)\); differentiating the subtracted cyclic term gives \(S_0\). They cancel, leaving the desired integrand. For the cosine case the same cancellation leaves \(x e^{ax}\cos(bx)\). The Fundamental Theorem of Calculus then gives the endpoint differences.

1
Form the paired antiderivatives.
Use \(S_0\) and \(C_0\) with the same \(D=a^2+b^2\).
2
Reduce the factor \(x\).
Integration by parts gives \(xS_0-\int S_0\,dx\) or \(xC_0-\int C_0\,dx\).
3
Use the cyclic identity.
Replace the remaining integral by its paired expression, keeping its sign.
4
Evaluate both endpoints.
Compute \(F(U)-F(L)\), including every boundary term.

If desired, the two antiderivatives can be written directly without \(S_0\) and \(C_0\):

$$ F_s(x)=\frac{e^{ax}}{D}\left[ x\bigl(a\sin(bx)-b\cos(bx)\bigr) -\frac{(a^2-b^2)\sin(bx)-2ab\cos(bx)}{D} \right], $$ $$ F_c(x)=\frac{e^{ax}}{D}\left[ x\bigl(a\cos(bx)+b\sin(bx)\bigr) -\frac{(a^2-b^2)\cos(bx)+2ab\sin(bx)}{D} \right]. $$

These expanded forms follow by substituting \(S_0\) and \(C_0\) into the theorem. They are convenient for endpoint evaluation, but the paired form often makes the integration-by-parts logic easier to see.

Worked Examples

Worked Example: A Sine Integral with Matching Parameters

Evaluate \(\int_0^\pi x e^x\sin x\,dx\). Here \(a=1\), \(b=1\), and \(D=1^2+1^2=2\). Therefore

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

The sine antiderivative is

$$ F_s(x)=xS_0(x)-\frac{S_0(x)-C_0(x)}{2} =\frac{e^x}{2}\bigl[x(\sin x-\cos x)+\cos x\bigr]. $$

At the upper endpoint, \(\sin\pi=0\) and \(\cos\pi=-1\), so \(F_s(\pi)=\frac{e^\pi}{2}(\pi-1)\). At the lower endpoint, \(F_s(0)=\frac12\). Hence

$$ \int_0^\pi x e^x\sin x\,dx =F_s(\pi)-F_s(0) =\frac{e^\pi(\pi-1)-1}{2}. $$

Check: writing \(g(x)=x(\sin x-\cos x)+\cos x\), product-rule differentiation gives \(g'(x)=-\cos x+x(\cos x+\sin x)\). Therefore \(g(x)+g'(x)=2x\sin x\), and \(F_s'(x)=\frac{e^x}{2}(g+g')=xe^x\sin x\), as required. The endpoint substitution above then verifies the definite value.

Worked Example: A Cosine Integral over a Full Oscillation

Evaluate \(\int_0^\pi x e^x\cos(2x)\,dx\). Here \(a=1\), \(b=2\), and \(D=5\). We have

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

Using \(F_c=xC_0-(C_0+2S_0)/5\), first combine the cyclic term: \[ C_0+2S_0=\frac{e^x(-3\cos 2x+4\sin 2x)}{5}. \] Thus

$$ F_c(x)=\frac{e^x}{5}\left[ x(\cos 2x+2\sin 2x) +\frac{3\cos 2x-4\sin 2x}{5} \right]. $$

At \(x=\pi\), \(\cos(2\pi)=1\) and \(\sin(2\pi)=0\), giving \(F_c(\pi)=\frac{e^\pi}{5}(\pi+3/5)\). At \(x=0\), the term multiplied by \(x\) is zero, while the remaining term gives \(F_c(0)=3/25\). Therefore

$$ \int_0^\pi x e^x\cos(2x)\,dx =\frac{e^\pi(5\pi+3)-3}{25}. $$

Check: set \(h=x(\cos 2x+2\sin 2x)+(3\cos 2x-4\sin 2x)/5\). Differentiating gives \(h'= \cos 2x+2\sin 2x+x(-2\sin 2x+4\cos 2x)+(-6\sin 2x-8\cos 2x)/5\). Adding \(h\) cancels the non-\(x\) terms and leaves \(5x\cos 2x\). Hence \(F_c'=e^x(h+h')/5=xe^x\cos 2x\).

Worked Example: A Decaying Exponential-Sine Integral

Evaluate \(\int_0^{\pi/2} x e^{-x}\sin(2x)\,dx\). Now \(a=-1\), \(b=2\), and \(D=5\). The paired antiderivatives are

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

The cyclic term is \((aS_0-bC_0)/D=(-S_0-2C_0)/5\), so \(F_s=xS_0+(S_0+2C_0)/5\). Combining these terms gives

$$ F_s(x)=\frac{e^{-x}}{5}\left[ x(-\sin 2x-2\cos 2x) +\frac{3\sin 2x-4\cos 2x}{5} \right]. $$

At \(x=\pi/2\), the angle is \(\pi\), so the sine is zero and the cosine is \(-1\). Thus \(F_s(\pi/2)=\frac{e^{-\pi/2}}{5}(\pi+4/5)=\frac{e^{-\pi/2}(5\pi+4)}{25}\). At \(x=0\), \(F_s(0)=-4/25\). It follows that

$$ \int_0^{\pi/2} x e^{-x}\sin(2x)\,dx =\frac{e^{-\pi/2}(5\pi+4)+4}{25}. $$

Check: differentiating the displayed \(F_s\) by the product rule, or using the theorem with \(a=-1\), \(b=2\), gives \(F_s'(x)=xe^{-x}\sin(2x)\). Substituting the two endpoints gives the stated difference, including the nonzero lower-end value.

Conditions, Endpoint Choices, and a Sign Pitfall

The formulas with \(D\) in the denominator require \(a^2+b^2>0\). If \(a=b=0\), the integrands reduce directly to \(x\sin 0=0\) and \(x\cos 0=x\). Therefore

$$ \int_L^U x\sin 0\,dx=0, \qquad \int_L^U x\cos 0\,dx=\frac{U^2-L^2}{2}. $$

This handles the only degenerate parameter pair. There is no need for \(a\) or \(b\) individually to be nonzero: for example, the formulas apply when \(a=0,b\ne0\), or \(b=0,a\ne0\). The interval endpoints can be any finite real numbers; if the order is reversed, the usual signed-integral rule gives \(\int_U^L=-\int_L^U\).

A frequent error is to lose a minus sign in the cyclic sine step. For \(a=b=1\), the correct identity is \(\int S_0\,dx=(S_0-C_0)/2\). If one incorrectly uses \((S_0+C_0)/2\), its derivative is \((e^x\sin x+e^x\cos x)/2\), which is not \(S_0=e^x(\sin x-\cos x)/2\). The incorrect expression therefore cannot be used as an antiderivative of \(S_0\). Keeping the paired identities visible until after integration by parts helps prevent this sign error.

Another endpoint mistake is to keep only the term containing \(x\) in \(F_s\) or \(F_c\). The remaining cyclic term is part of the antiderivative and can be nonzero even when \(x=0\), as the examples show. The safe procedure is to evaluate the complete \(F(U)\), evaluate the complete \(F(L)\), and subtract.

Why This Method Is Useful

The polynomial factor is reduced by one degree through integration by parts, while the exponential-trigonometric pair returns to the same two-function system. For a linear factor, the reduction ends after one integration-by-parts step. The cyclic antiderivatives make that final remainder explicit, so there is no unresolved integral left.

The same structure also explains why endpoint simplification can be substantial. When \(bU\) or \(bL\) is a familiar angle, sine and cosine may take simple exact values. That simplifies evaluation, but it does not remove the need to include all terms in the endpoint antiderivative. For general finite endpoints, the formula remains valid without any period assumption.

Key takeaway: For \(a^2+b^2>0\), first form the paired antiderivatives \(S_0\) and \(C_0\), then apply integration by parts to \(x\). The result is an endpoint difference \(F(U)-F(L)\); retaining the cyclic boundary term and checking the derivative protects against the most common errors.

Check Your Understanding

Use the paired antiderivatives and endpoint formulas to answer these questions.

  1. What condition on \(a\) and \(b\) is needed for the formulas involving \(D=a^2+b^2\)?
  2. In the sine case, which cyclic expression is an antiderivative of \(S_0\)?
  3. Why does differentiating \(xS_0-(aS_0-bC_0)/D\) leave \(x e^{ax}\sin(bx)\)?
  4. Evaluate \(\int_0^1 x\cos x\,dx\) using the cosine formula.
  5. What are the sine-weighted and cosine-weighted integrals 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