# Differentiate the following functions with respect to x :

Question:

Differentiate the following functions with respect to $x$ :

$\log (3 x+2)-x^{2} \log (2 x-1)$

Solution:

Let $y=\log (3 x+2)-x^{2} \log (2 x-1)$

On differentiating $y$ with respect to $x$, we get

$\frac{d y}{d x}=\frac{d}{d x}\left[\log (3 x+2)-x^{2} \log (2 x-1)\right]$

$\Rightarrow \frac{\mathrm{dy}}{\mathrm{dx}}=\frac{\mathrm{d}}{\mathrm{dx}}[\log (3 \mathrm{x}+2)]-\frac{\mathrm{d}}{\mathrm{dx}}\left[\mathrm{x}^{2} \log (2 \mathrm{x}-1)\right]$

$\Rightarrow \frac{\mathrm{dy}}{\mathrm{dx}}=\frac{\mathrm{d}}{\mathrm{dx}}[\log (3 \mathrm{x}+2)]-\frac{\mathrm{d}}{\mathrm{dx}}\left[\mathrm{x}^{2} \times \log (2 \mathrm{x}-1)\right]$

Recall that (uv)' $=v u^{\prime}+u v^{\prime}$ (product rule)

$\Rightarrow \frac{\mathrm{dy}}{\mathrm{dx}}=\frac{\mathrm{d}}{\mathrm{dx}}[\log (3 \mathrm{x}+2)]-\left[\log (2 \mathrm{x}-1) \frac{\mathrm{d}}{\mathrm{dx}}\left(\mathrm{x}^{2}\right)+\mathrm{x}^{2} \frac{\mathrm{d}}{\mathrm{dx}}[\log (2 \mathrm{x}-1)]\right]$

$\Rightarrow \frac{\mathrm{dy}}{\mathrm{dx}}=\frac{\mathrm{d}}{\mathrm{dx}}[\log (3 \mathrm{x}+2)]-\log (2 \mathrm{x}-1) \frac{\mathrm{d}}{\mathrm{dx}}\left(\mathrm{x}^{2}\right)-\mathrm{x}^{2} \frac{\mathrm{d}}{\mathrm{dx}}[\log (2 \mathrm{x}-1)]$

We know $\frac{\mathrm{d}}{\mathrm{dx}}(\log \mathrm{x})=\frac{1}{\mathrm{x}}$ and $\frac{\mathrm{d}}{\mathrm{dx}}\left(\mathrm{x}^{\mathrm{n}}\right)=\mathrm{nx}^{\mathrm{n}-1}$

$\Rightarrow \frac{d y}{d x}=\frac{1}{3 x+2} \frac{d}{d x}(3 x+2)-\log (2 x-1) \times 2 x-x^{2} \times \frac{1}{2 x-1} \frac{d}{d x}(2 x-1)$

$\Rightarrow \frac{d y}{d x}=\frac{1}{3 x+2}\left[\frac{d}{d x}(3 x)+\frac{d}{d x}(2)\right]-2 x \log (2 x-1)-\frac{x^{2}}{2 x-1}\left[\frac{d}{d x}(2 x)-\frac{d}{d x}(1)\right]$

$\Rightarrow \frac{\mathrm{dy}}{\mathrm{dx}}=\frac{1}{3 \mathrm{x}+2}\left[3 \frac{\mathrm{d}}{\mathrm{dx}}(\mathrm{x})+\frac{\mathrm{d}}{\mathrm{dx}}(2)\right]-2 \mathrm{x} \log (2 \mathrm{x}-1)$

$-\frac{\mathrm{x}^{2}}{2 \mathrm{x}-1}\left[2 \frac{\mathrm{d}}{\mathrm{dx}}(\mathrm{x})-\frac{\mathrm{d}}{\mathrm{dx}}(1)\right]$

We have $\frac{\mathrm{d}}{\mathrm{dx}}(\mathrm{x})=1$ and derivative of a constant is 0 .

$\Rightarrow \frac{d y}{d x}=\frac{1}{3 x+2}[3 \times 1+0]-2 x \log (2 x-1)-\frac{x^{2}}{2 x-1}[2 \times 1-0]$

$\Rightarrow \frac{d y}{d x}=\frac{1}{3 x+2} \times 3-2 x \log (2 x-1)-\frac{x^{2}}{2 x-1} \times 2$

$\Rightarrow \frac{d y}{d x}=\frac{3}{3 x+2}-2 x \log (2 x-1)-\frac{2 x^{2}}{2 x-1}$

$\therefore \frac{d y}{d x}=\frac{3}{3 x+2}-\frac{2 x^{2}}{2 x-1}-2 x \log (2 x-1)$

Thus, $\frac{d}{d x}\left[\log (3 x+2)-x^{2} \log (2 x-1)\right]=\frac{3}{3 x+2}-\frac{2 x^{2}}{2 x-1}-2 x \log (2 x-1)$