Confusion concerning logarithmic differentiation

36 Views Asked by At

The problem is stated as follows:

Find the equation of the line perpendicular to $f(x)=\pi^2+2^x+x^2+x^{1/x}$ at $x=1$.

My approach was this:

Notice that $f(1)=4+\pi^2$ so I am interested in the point $P(1, 4+\pi^2)$

Then taking the derivative \begin{align} \frac{df}{dx}&=\frac{d}{dx}\pi^2+\frac{d}{dx}2^x+\frac{d}{dx}x^2+\frac{d}{dx}x^{1/x}\\ &=2^x\ln{2}+2x+\frac{d}{dx}e^{1/x\ln{x}}\\ &=2^x\ln{2}+2x+x^{1/x}\cdot\left(-\frac{1}{x^2}\ln{x}+\frac{1}{x^2}\right)\\ \end{align}

Now finding $f'(1)$: \begin{align} f'(1)&=2\ln{2}+2+1\cdot\left(-\frac{1}{1^2}\ln{1}+\frac{1}{1^2}\right)\\ &=2\ln{2}+3 \end{align}

Now taking the opposite reciprocal gives \begin{align} -\frac{1}{2\ln{2}+3} \end{align}

Now using point $P$ we get the following equation \begin{align} y-(4+\pi^2)&=-\frac{1}{2\ln{2}+3}\cdot(x-1)\\ y&=-\frac{(x-1)}{2\ln{2}+3}+4+\pi^2 \end{align}

I am quite certain that this is the correct answer. However, when I try a different method, namely logarithmic differentiation I get a different derivative:

Taking the natural log of both sides: \begin{align} \ln{f(x)}=\ln\pi^2+\ln{2^x}+\ln{x^2}+\ln{x^{1/x}}\\ \end{align}

And differentiating both sides: \begin{align} \frac{f'(x)}{f(x)}&=\frac{d}{dx}\ln{\pi^2}+\frac{d}{dx}x\cdot\ln{2}+\frac{d}{dx}2\ln{x}+\frac{d}{dx}\frac{1}{x}\ln{x}\\ f'(x)&=\left(\ln{2}+\frac{2}{x}+\frac{1}{x^2}-\frac{1}{x^2}\ln{x}\right)\cdot(\pi^2+2^x+x^2+x^{1/x}) \end{align}

Clearly something has gone very wrong here. Is there a flaw in my original answer or am I misunderstanding the logarithmic differentiation? Any help is appreciated, thanks!

1

There are 1 best solutions below

4
On

$$f(x)=\pi^2+2^x+x^2+x^{1/x}$$ $$\ln |f(x)|=\ln |\pi^2+2^x+x^2+x^{1/x}|$$ You don't have a product of factors on RHS.This line is not correct: $$\ln{f(x)}\ne \ln\pi^2+\ln{2^x}+\ln{x^2}+\ln{x^{1/x}}\\$$