Solveeit Logo

Question

Question: How do you find the derivative of \(\log {{x}^{2}}\)?...

How do you find the derivative of logx2\log {{x}^{2}}?

Explanation

Solution

We recall the definition of composite function gof(x)=g(f(x))gof\left( x \right)=g\left( f\left( x \right) \right). We recall the chain rule of differentiation dydx=dydu×dudx\dfrac{dy}{dx}=\dfrac{dy}{du}\times \dfrac{du}{dx} where y=gofy=gof and u=f(x)u=f\left( x \right). We first find u=f(x)u=f\left( x \right) as the function inside the bracket and yy as the given function and then differentiate using chain rule. We then solve alternatively using the first principle as ddxf(x)=limh0f(x+h)f(x)h\dfrac{d}{dx}f\left( x \right)=\displaystyle \lim_{h \to 0}\dfrac{f\left( x+h \right)-f\left( x \right)}{h}.

Complete step-by-step solution:
If the functions f(x),g(x)f\left( x \right),g\left( x \right) are defined within sets f:ABf:A\to B and g:BCg:B\to C then the composite function from A to C is defend as g(f(x))g\left( f\left( x \right) \right) within sets gof:ACgof:A\to C. If we denote g(f(x))=yg\left( f\left( x \right) \right)=y and f(x)=uf\left( x \right)=u then we can differentiate the composite function using chain rule as
ddxg(f(x))=dydx=dydu×dudx\dfrac{d}{dx}g\left( f\left( x \right) \right)=\dfrac{dy}{dx}=\dfrac{dy}{du}\times \dfrac{du}{dx}
We are asked to differentiate the function logx=log(x2)\log x=\log \left( {{x}^{2}} \right). We see that it is a composite function which is made by a polynomial function that is x2{{x}^{2}} and a logarithmic function that is logx\log x. Let us assign the function within the bracket as f(x)=x2=uf\left( x \right)={{x}^{2}}=u and g(x)=logxg\left( x \right)=\log x. So we have g(f(x))=g(x2)=log(x2)=yg\left( f\left( x \right) \right)=g\left( {{x}^{2}} \right)=\log \left( {{x}^{2}} \right)=y. We differentiate using chain rule to have;

& \dfrac{dy}{dx}=\dfrac{dy}{du}\times \dfrac{du}{dx} \\\ & \Rightarrow \dfrac{d}{dx}y=\dfrac{d}{du}y\times \dfrac{d}{dx}u \\\ & \Rightarrow \dfrac{d}{dx}\log {{x}^{2}}=\dfrac{d}{d\left( {{x}^{2}} \right)}\left( \log {{x}^{2}} \right)\times \dfrac{d}{dx}\left( {{x}^{2}} \right) \\\ \end{aligned}$$ We know that from standard differentiation of logarithmic function $\dfrac{d}{dt}\log t=\dfrac{1}{t}$. We use it for $t={{x}^{2}}$ in the above step to have $$\Rightarrow \dfrac{d}{dx}\log {{x}^{2}}=\dfrac{1}{{{x}^{2}}}\times \dfrac{d}{dx}\left( {{x}^{2}} \right)$$ We know that from standard differentiation of polynomial function as $\dfrac{d}{dt}{{t}^{n}}=n{{t}^{n-1}}$ where $n$ is any real number. We use it for $t=x,n=2$ in the above step to have $$\begin{aligned} & \Rightarrow \dfrac{d}{dx}\log {{x}^{2}}=\dfrac{1}{{{x}^{2}}}\times 2x \\\ & \Rightarrow \dfrac{d}{dx}\log {{x}^{2}}=\dfrac{2}{x} \\\ \end{aligned}$$ Alternative Method: We can find the derivative using the first principle. We know that derivative using the first principle for any continuous function $f\left( x \right)$ at any point in the domain of $f$ is obtained from the following working rule $$\dfrac{d}{dx}f\left( x \right)=\displaystyle \lim_{h \to 0}\dfrac{f\left( x+h \right)-f\left( x \right)}{h}$$ We put $f\left( x \right)=\log {{x}^{2}}$ in the working rule as $$\dfrac{d}{dx}\log {{x}^{2}}=\displaystyle \lim_{h \to 0}\dfrac{\log {{\left( x+h \right)}^{2}}-\log {{x}^{2}}}{h}$$ We use the logarithmic identity involving power $m{{\log }_{b}}x={{\log }_{b}}{{x}^{m}}$ with $m\ne 0$ a in the numerator of the above step for $x=x+h,m=2$ and then fro $x=x,m=2$ to have; $$\begin{aligned} & \Rightarrow \dfrac{d}{dx}\log {{x}^{2}}=\displaystyle \lim_{h \to 0}\dfrac{2\log \left( x+h \right)-2\log x}{h} \\\ & \Rightarrow \dfrac{d}{dx}\log {{x}^{2}}=\displaystyle \lim_{h \to 0}\dfrac{2\left( \log \left( x+h \right)-\log x \right)}{h} \\\ \end{aligned}$$ We also know the logarithmic identity involving quotient $\log \left( \dfrac{m}{n} \right)=\log m-\log n$ for $m=x+h,n=x$ in the above step to have; $$\begin{aligned} & \Rightarrow \dfrac{d}{dx}\log {{x}^{2}}=\displaystyle \lim_{h \to 0}\dfrac{2\log \left( \dfrac{x+h}{x} \right)}{h} \\\ & \Rightarrow \dfrac{d}{dx}\log {{x}^{2}}=\displaystyle \lim_{h \to 0}\dfrac{2\log \left( 1+\dfrac{h}{x} \right)}{h} \\\ \end{aligned}$$ We multiply $\dfrac{1}{x}$in the above step in the numerator and denominator of the limit to have ; $$\begin{aligned} & \Rightarrow \dfrac{d}{dx}\log {{x}^{2}}=\displaystyle \lim_{h \to 0}\dfrac{2\times \dfrac{1}{x}\log \left( 1+\dfrac{h}{x} \right)}{h\times \dfrac{1}{x}} \\\ & \Rightarrow \dfrac{d}{dx}\log {{x}^{2}}=\displaystyle \lim_{h \to 0}\dfrac{\dfrac{2}{x}\log \left( 1+\dfrac{h}{x} \right)}{\dfrac{h}{x}} \\\ & \Rightarrow \dfrac{d}{dx}\log {{x}^{2}}=\dfrac{2}{x}\displaystyle \lim_{h \to 0}\dfrac{\log \left( 1+\dfrac{h}{x} \right)}{\dfrac{h}{x}} \\\ \end{aligned}$$ We use the standard limit $\displaystyle \lim_{t\to 0}\dfrac{\log \left( 1+t \right)}{t}=1$ for $t=\dfrac{h}{x}$ in the above step to have $$\Rightarrow \dfrac{d}{dx}\left( \log {{x}^{2}} \right)=\dfrac{2}{x}\times 1=\dfrac{2}{x}$$ **Note:** We note that we can directly use the logarithmic identity involving power $m{{\log }_{b}}x={{\log }_{b}}{{x}^{m}}$ to have $\log {{x}^{2}}=2\log x$ and then we can differentiate $2\log x$ with respect to $x$ to have $\dfrac{d}{dx}\left( \log {{x}^{2}} \right)=\dfrac{d}{dx}\left( 2\log x \right)=2\dfrac{d}{dx}\log x=2\times \dfrac{1}{x}=\dfrac{2}{x}$ . We note that logarithmic function takes only positive real numbers as input. Since the range of ${{x}^{2}}$ is the non-negative real number set which includes 0, the given function $\log {{x}^{2}}$ will be defined as $\log {{x}^{2}}:{{\mathsf{\mathbb{R}}}^{+}}\to {{\mathsf{\mathbb{R}}}^{+}}$.