A genuinely different situation arises with integrands like eaxsinbx or eaxcosbx: applying integration by parts does not make the integral simpler or terminate the way it does for xneax — instead, after two applications, the original integral reappears on the right-hand side, and the trick is to solve for it algebraically rather than keep integrating forever.
Result 11.1.
∫eaxsinbxdx=a2+b2eax[asinbx−bcosbx]+c,
∫eaxcosbxdx=a2+b2eax[acosbx+bsinbx]+c.
Proof (own words), part (i). Let I=∫eaxsinbxdx. Take u=sinbx (du=bcosbxdx) and dv=eaxdx (v=aeax); integration by parts gives
I=aeaxsinbx−ab∫eaxcosbxdx.
Now apply integration by parts a second time to the remaining integral, this time with u=cosbx (du=−bsinbxdx) and the same dv=eaxdx:
∫eaxcosbxdx=aeaxcosbx+ab∫eaxsinbxdx=aeaxcosbx+abI.
Substituting this back into the expression for I:
I=aeaxsinbx−ab[aeaxcosbx+abI]=aeaxsinbx−a2beaxcosbx−a2b2I.
The unknown I now appears on both sides, exactly the payoff of doing two by-parts steps with the same pairing convention throughout (per the Caution of §11.7.6). Collecting the I terms,
I(1+a2b2)=a2aeaxsinbx−beaxcosbx ⟹ I⋅a2a2+b2=a2eax[asinbx−bcosbx],
and multiplying both sides by a2+b2a2 gives I=a2+b2eax[asinbx−bcosbx]+c, as stated. The cosine version follows by the identical two-step argument with the roles of sine and cosine exchanged at the first step.
As with Bernoulli's formula, the pairing of u and dv chosen at the first application must be kept consistent at the second application (sine paired with eax the same way both times) — swapping the assignment partway through would make the two by-parts steps cancel instead of closing the loop.
Using the result. With a and b read off the given integral, the two boxed formulas are applied directly — e.g. for ∫e3xcos2xdx, take a=3,b=2 to get 13e3x(3cos2x+2sin2x)+c; for ∫e−5xsin3xdx, take a=−5,b=3 to get −34e−5x(5sin3x+3cos3x)+c.
Result 11.2. A second, unrelated shortcut is useful whenever the integrand has the specific shape ex times a sum of a function and its own derivative:
∫ex[f(x)+f′(x)]dx=exf(x)+c.
Proof (own words). Split the integral into two pieces, ∫exf(x)dx+∫exf′(x)dx. Apply integration by parts to the first piece only, with u=f(x) (du=f′(x)dx) and dv=exdx (v=ex): ∫exf(x)dx=exf(x)−∫exf′(x)dx. Substituting this back,
∫ex[f(x)+f′(x)]dx=exf(x)−∫exf′(x)dx+∫exf′(x)dx+c=exf(x)+c,
since the two copies of ∫exf′(x)dx exactly cancel. …