Integration by parts question: why does the constant of integration get swallowed up?

161 Views Asked by At

To integrate $e^x\cos x$ we can use integration by parts twice: \begin{align} \int e^x \cos x \, dx &= e^x\sin x - \int e^x\sin x \, dx \\ &= e^x\sin x - \left(-e^x\cos x + \int e^x\cos x \, dx\right) \\ &= e^x\sin x + e^x\cos x - \int e^x \cos x \, dx \\ 2 \int e^x\cos x \, dx &= e^x(\sin x + \cos x) \\ \int e^x \cos x \, dx &= \frac{e^x(\sin x + \cos x)}{2} \end{align} But this solution is incomplete: there should be a constant of integration at the end. Why does this happen? I think it might have something to do that you are adding a family of functions to itself, but I can’t quite pin down what the problem is.

4

There are 4 best solutions below

13
On BEST ANSWER

Strictly speaking, you have something more like $F(x)=e^x \sin(x) - G(x)$ then $F(x)=e^x \sin(x) + e^x \cos(x) - H(x)$, where $F$ and $H$ are both some antiderivatives of $e^x \cos(x)$ (not necessarily the same ones) and $G$ is some antiderivative of $e^x \sin(x)$. Now $F$ and $H$ differ only by a constant, so $2F(x)=e^x \sin(x) + e^x \cos(x) + C$ and then you divide.

In practice if you want to take derivations seriously, you're better off with definite integrals with variable limits, i.e. working with $\int_a^x f(y) dy$ instead of $\int f(x) dx$.

0
On

Whenever you have an indefinite integral, there is a constant of integration.

When you make the limits definite, the constant is subtracted away since it occurs in both the lower and upper limit.

0
On

In order to find $\int f(x)\,dx$ (on an interval $I$), all one needs is to find one differentiable function $F:I\to\mathbb{R}$ such that $F'(x)=f(x)$ for every $x\in I$. Then $$ \int f(x)\, dx=F(x)+C $$

This is the definition of indefinite integrals. This definition is based on the observations that

  • If $F:I\to\mathbb{R}$ is such that $F'=f$ on I, then for any constant $K$, $(F+K)'=f$ on $I$;

  • If $G:I\to\mathbb{R}$ and $F:I\to\mathbb{R}$ are such that $G'=F'$ on $I$, then there exists a constant $K$ with $G=F+K$. (This is why it is important that $I$ is "connected", i.e., an interval on $\mathbb{R}$.)


Now go back to your integral where $f(x)= \int e^x\cos x$, $I=\mathbb{R}$. The formal$\dagger$ calculation just gives you one $F$ such that $F'=f$ on $I$, which give you the answer: $$ \int e^x\cos x\,dx=\frac{1}{2}e^x(\sin x+\cos x)+C. $$


$\dagger$ The reason it is "formal" is that by definition, $$ \int f(x)\,dx $$ means a family (set) of functions (on $I$); but in the calculation, one uses only one "instance" of the set. This is OK since one can eventually add the "arbitrary constant" $C$ to get the answer.

0
On

This solution to your problem makes use of a very basic fact. Note that $\int f(x)~dx=\int f(x)+0~dx$ $$\begin{align}\int e^x \cos x \, dx&= e^x\sin x - \left(-e^x\cos x + \int e^x\cos x \, dx\right)\\ &=e^x\sin x+e^x\cos x-\int e^x\cos x \, dx\\ &=e^x\sin x+e^x\cos x-\int e^x\cos x \, dx+\int0~dx\end{align}$$ Hence, $$2\int e^x\cos x \, dx=e^x\sin x+e^x\cos x+C$$