Integrate $\int e^x \cosh(x) \: dx$ by parts I was presented with the following question: 

Evaluate: $$I:=\int e^x \cosh(x) \: dx$$

So we let $u=\cosh(x)$ and $v'=e^x$, therefore $u'=\sinh(x)$ and $v=e^x$.
Therefore $I:=e^x \cosh(x)-\int e^x \sinh(x)=e^x \cosh(x) - (e^x \sinh(x) - \int e^x \cosh(x)\: dx$
Thus: $I = e^x \cosh(x) - e^x \sinh(x) + I \implies 0 = e^x(\cosh(x)-\sinh(x))=e^x e^{-x} = 1$ 
How is this valid?
 A: I wasn't sure if it was worth answering a few month old question but seeing as this was one of the first results that came on Google when searching about it I thought it might be helpful for anyone else looking as well. I'm only a student but If I'm not mistaken, following on from:
$$I:=∫e^x \ \cosh \ x\ dx,$$ therefore:
$$I =∫e^x \ \cosh \ x\ dx \ = \ e^x\ \cosh\ x\ -\ e^x\ \sinh\ x \ - ∫e^x\ \cosh\ x\ dx$$ 
$$I=∫e^x \ \cosh \ x\ dx \ = \ e^x\ \cosh\ x\ -\ e^x\ \sinh\ x \ - I$$ 
$$2I =2∫e^x\ \cosh\ x\ dx =  e^x\ \cosh\ x - e^x\ \sinh\ x + c, $$ so:
$$I =∫e^x \cosh\ x \ dx = {e^x \ \cosh\ x - e^x \ \sinh\ x + c\over 2}. $$ 
I think the problem was that if you added $I:=∫e^x\ \cosh\ x\ dx$ to right side, you needed to add it to the left as well.
On another note, I apologize for the lack of structure in the answer and formatting. Never had to use Mathjax before. Wish the basic tutorial was improved and made more user friendly.
A: $$e^x\cosh x=\frac{1}{2}e^x(e^x+e^{-x})=\frac{1}{2}(e^{2x}+1)\Longrightarrow$$
$$\int e^x\cosh x\,dx=\frac{1}{2}\int(e^{2x}+1)dx=\frac{1}{4}e^{2x}+\frac{x}{2}+C=\frac{1}{4}\left(e^{2x}+2x\right)+C$$
As you did by parts doesn't work since $\,e^x(\cosh x-\sinh x)=e^x(e^{-x})=1\,$...
A: Given
$$
\int \exp(x) \cosh(x) dx
$$
Write this as
$$
\int \exp(x) \cosh(ax) dx
$$
then
$$
\begin{eqnarray}
\int \exp(x) \cosh(ax) dx &=& \exp(x) \cosh(ax)  - a \int \exp(x) \sinh(ax) dx\\
&=& \exp(x) \cosh(ax) - a \exp(x) \sinh(ax) + a^2 \int \exp(x) \cosh(ax) dx
\end{eqnarray}
$$
thus
$$
\begin{eqnarray}
\int \exp(x) \cosh(ax) dx &=& \frac{ \exp(x) \cosh(ax) - a \exp(x) \sinh(ax)}
{ (1 - a)(1+a) }
\end{eqnarray}
$$
whence
$$
\begin{eqnarray}
\int \exp(x) \cosh(x) dx &=& \lim_{a \rightarrow 1} \frac{ \exp(x) \cosh(ax) - a \exp(x) \sinh(ax)}{ (1 - a) (1 + a) }
\end{eqnarray}
$$

The last part - taking the limit gives
$$
\begin{eqnarray}
\int \exp(x) \cosh(x) dx &=& \lim_{a \rightarrow 1} \frac{ \exp(x) \cosh(ax) - a \exp(x) \sinh(ax)}{ (1 - a) (1 + a) }\\
&=& \lim_{a \rightarrow 1} \frac{x \exp(x) [ \sinh(ax) - a \cosh(ax)] - \exp(x) \sinh(ax)}{-2}\\
&=& \frac{1}{2} \exp(x)\sinh(x) + \frac{1}{2} x
\end{eqnarray}
$$
