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.
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
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:
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
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.
Use \(u=t^n\), \(dv=e^{at}\cos(bt)\,dt\), so \(du=nt^{n-1}\,dt\) and \(v=V_C(t)\).
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\).
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\).
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
For the cosine moment, the recurrence gives
For the sine moment, first compute \(S_0-C_0=1-e^x\cos x\). Therefore
To check the cosine result, differentiate its numerator using the product rule. The terms simplify as follows:
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
Now reduce degree two:
Differentiate each result to check it. For the cosine moment,
For the sine moment,
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
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
Similarly, \(S_0-2C_0=[e^x(-4c-3s)+4]/5\), so
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.
- For what values of \(a\) and \(b\) can the displayed recurrence be used with denominator \(a^2+b^2\)?
- Why is there no lower-endpoint term at zero when \(n\ge1\)?
- Write the recurrence for \(C_2(x)\) in terms of \(C_1(x)\), \(S_1(x)\), and the degree-two boundary term.
- In the sine recurrence, what is the sign in front of \(bC_{n-1}(x)\), and which antiderivative produces it?
- What are \(C_n(x)\) and \(S_n(x)\) when \(a=b=0\)?