# a) Find the first derivative and second derivative of the following functions (in their...

## Question:

a) Find the first derivative and second derivative of the following functions (in their respective domains):

i. {eq}y = e^{1-x^2} {/eq}

ii. {eq}y = 3x + ln(\frac{3x-4}{x-1}) {/eq}

b) Determine in which intervals of their respective domains the functions in part a) are increasing and decreasing.

c) Determine in which intervals of their respective domains the functions in part a) are convex and concave.

## Concavity of Functions

If the graph of a function is given, we can determine the function's concavity, by looking where the tangent line to the graph lie with respect to the graph.

If the tangent line to a point is above the graph, the function is concave down or convex, otherwise, is concave up.

The concavity of a function, when the graph is not given, is determined by the second derivative:

{eq}\displaystyle \text{ if } f''(x)>0 \implies f(x) \text{ is concave up }\\ \displaystyle \text{ if } f''(x)<0 \implies f(x) \text{ is concave down (or convex)}. {/eq}

Differentiating, we may need to sue the following formulae,

Differentiating, we may need the following formula

{eq}\displaystyle \frac{d}{dx}(x^n)=nx^{n-1}\\ \displaystyle \frac{d}{dx}(e^x)=e^x\\ \displaystyle \frac{d}{dx}(\ln x)=\frac{1}{x}\\ \displaystyle \text{ or Chain rule } \frac{d}{dx}\left[f(g(x))\right]=\frac{df}{dg}(g(x))\cdot \frac{dg}{dx}(x). {/eq}

a) The first and second derivatives of {eq}\displaystyle y = e^{1-x^2} {/eq}

are obtained by using Chain rule as below

{eq}\displaystyle \begin{align}y' &=\frac{d}{dx} \left(e^{1-x^2}\right)=e^{1-x^2}\frac{d}{dx} \left(1-x^2\right)= \boxed{-2xe^{1-x^2}}.\\ y'' &=\frac{d}{dx}(y')=\frac{d}{dx} \left(-2xe^{1-x^2}\right)\\ &=\left[-2-2x(-2x)\right]e^{1-x^2}\\ &=\boxed{(4x^2-2)e^{1-x^2}}. \end{align} {/eq}

The first and second derivatives of {eq}\displaystyle y = 3x + \ln\left(\frac{3x-4}{x-1}\right) {/eq}

are obtained by using Chain rule as below

{eq}\displaystyle \begin{align}y' &=\frac{d}{dx} \left( 3x + \ln\left(\frac{3x-4}{x-1}\right)\right)= 3+ \frac{x-1}{3x-4}\cdot \frac{d}{dx} \left(\frac{3x-4}{x-1}\right), &\left[\text{differentiating the logarithm we use } \frac{d}{dx}(\ln f(x))=\frac{f'(x)}{f(x)}\right]\\ &=3+ \frac{x-1}{3x-4}\cdot\frac{3(x-1)-(3x-4)}{(x-1)^2}, &\left[\text{using product rule}\right]\\ &=\boxed{3+ \frac{1}{(3x-4)(x-1)}}.\\ y'' &=\frac{d}{dx}(y')=\frac{d}{dx} \left(3+ \frac{1}{(3x-4)(x-1)}\right)\\ &= \frac{d}{dx} \left((3x-4)^{-1}(x-1)^{-1}\right)\\ &= -3(3x-4)^{-2}(x-1)^{-1}-(3x-4)^{-1}(x-1)^{-2}, &\left[\text{using product rule}\right]\\ &=-\frac{3}{(3x-4)^{2}(x-1)}-\frac{1}{(3x-4)(x-1)^2}\\ &=\boxed{ \frac{7-6x}{(3x-4)^{2}(x-1)^2}}. \end{align} {/eq}

b) To find the intervals where the function is increasing or decreasing, we will determine the sign of the first derivative.

For the function {eq}\displaystyle y = e^{1-x^2} {/eq} the derivative is positive {eq}\displaystyle y'=-2xe^{1-x^2}>0 \iff -2x>0, \text{ because the exponential function is positive for all values}\\ \displaystyle \boxed{\text{ the function is increasing on }(-\infty, 0) \text{ and the function is decreasing on }(0,\infty)}. {/eq}

For the function {eq}\displaystyle y = 3x + \ln\left(\frac{3x-4}{x-1}\right) {/eq} the first derivative is positive {eq}\displaystyle \begin{align}y'&=3+ \frac{1}{(3x-4)(x-1)}>0 \iff \frac{9x^2-21x+13}{(3x-4)(x-1)}>0, \\ &\text{because the numerator } 9x^2-21x+13>0 \text{ for all values of }x \text{ since the discriminant is }\Delta=21^2-36\cdot 13<0 \text{ and the parabola opens up}\\ &\text{ the denominator should be positive } (3x-4)(x-1)>0\iff x\in \left(-\infty, 1\right)\cup \left(\frac{4}{3},\infty\right)\\ & \boxed{\text{ so, the function is increasing on }\left(-\infty, 1\right)\cup \left(\frac{4}{3},\infty\right) \text{ and the function is decreasing on }\left(1, \frac{4}{3}\right)}. \end{align} {/eq}

c) To find the intervals where the function is concave up or down, we will determine the sign of the second derivative.

For the function {eq}\displaystyle y = e^{1-x^2} {/eq} the second derivative is positive {eq}\displaystyle y''=(4x^2-2)e^{1-x^2}>0 \iff 4x^2-2>0, \text{ because the exponential function is positive for all values}\\ \displaystyle \boxed{\text{ the function is concave up on }(-\infty, -\sqrt{2})\cup(\sqrt{2}, \infty) \text{ and the function is concave down (convex) on }(-\sqrt{2},\sqrt{2})}. {/eq}

For the function {eq}\displaystyle y = 3x + \ln\left(\frac{3x-4}{x-1}\right) {/eq} the second derivative is positive {eq}\displaystyle y''=\frac{7-6x}{(3x-4)^{2}(x-1)^2}>0 \iff 7-6x>0, \text{ because the denominator is positive for all values}\\ \displaystyle \boxed{\text{ the function is concave up on }\left(-\infty, \frac{7}{6}\right) \text{ and the function is concave down (convex) on }\left(\frac{7}{6},\infty\right)}. {/eq}