$ \int\frac{g(x)}{f(x)} \, dx $ where $f(x) = \frac{1}{2}(e^x+e^{-x})$ and $g(x) = \frac{1}{2}(e^x - e^{-x})$?

404 Views Asked by At

Given two functions $f(x) = \frac{1}{2}(e^x+e^{-x})$ and $g(x) = \frac{1}{2}(e^x - e^{-x})$, calculate

$$ \int\frac{g(x)}{f(x)} \, dx. $$

Observing that $f'(x) = g(x)$, this is very easy to do. Just take $u = f(x)$ and therefore $du = f'(x)\,dx$. Now we have

$$ \int \frac{f'(x)}{f(x)} \, dx = \int \frac{du}{u} = \ln |u| + C = \ln\left|\frac{1}{2}(e^x+e^{-x})\right|+C. $$

However, this solution is wrong. The correct one is $\ln|e^x+e^{-x}| + C$. I see how we could get that, just plug in $g(x)$ and $f(x)$ directly, and we get

$$ \int \frac{\frac{1}{2}(e^x - e^{-x})}{\frac{1}{2}(e^x+e^{-x})} \, dx. $$

Cancelling the $\frac{1}{2}$'s and taking $u = e^x+e^{-x}$ and $du = (e^x-e^{-x}) dx$ gives us

$$ \int \frac{du}{u} = \ln|u| + C = \ln|e^x+e^{-x}| + C. $$

I can't see where I made a mistake in my approach, and I'd be really grateful if you pointed it out.

2

There are 2 best solutions below

3
On

Note that if $K$ is a constant, $\ln|K\cdot h(x)|= \ln|K|+\ln|h(x)|$. In other words, the $1/2$ in the log can get 'absorbed' into the $+C$ term.

0
On

Using the identity: $ \log (\frac{a}{b})=\log(a)- \log(b)$

$\ln \frac{1}{2}(e^x+e^{-x})+C$
$=\ln (e^x+e^{-x})-\ln 2+C $
$=\ln (e^x+e^{-x})+C{'} $ (as $\ln 2$ is constant)