# For what values of x does the graph of f have a horizontal tangent? f(x) = e^x(cos(x))

### 2 Answers | Add Yours

We first take the derivative of f.

We apply the Product Rule for differentiation here:

`d(uv) = vdu+ udv`

Let set `u = e^x`

So, `du = e^xdx`

` `

Let set `v= cosx`

So, `v = -sinx`

Applying the formula:````

`f ' = e^x*cosx - sinx * e^x`

`f' = e^xcosx - sinxe^x`

We can factor out e^x on right side.

`f' = e^x(cosx - sinx)`

We know that the slope for the horizontal tangent is zero.

So, we equate f ' to zero.

`e^x(cosx - sinx) = 0`

We equate each factor to zero.

`e^x = 0 ; cosx - sinx = 0`

The e^x will never be equal to zero, the range of it is always greater than zero. Hence, we only consider the second equation.

`cosx - sinx = 0`

We square both sides.

`(cosx - sinx)^2 = 0^2`

`cos^2x - 2sinxcosx + sin^2x = 0`

Using the identity: `cos^2x + sin^2x = 1`

We will have,

`1 - 2sinxcosx = 0`

USe the double angle for sine: `2sinxcosx = sin(2x)`

```1 - sin(2x) = 0`

Add sin(2x) on each sides.

`sin(2x) = 1`

Take the arcsine of both sides. Note that if the x is in the interval [0, 2pi), the 2x will be in the interval [0, 4pi).

`2x = pi/2` ;`2x = (5pi)/2`

Divide each equation by 2 both sides.

`x = {pi/4, (5pi)/4}`

`f(x)=e^(x)cos(x)` (i)

for horizontal tangents to the curve (i),differentiate (i) with respect to x ,

`f'(x)=e^x cos(x)-e^(x)sin(x)`

`=e^x(cos(x)-sin(x))`

for horizontal tangents we equate `f'(x)=0` ,Thus

`e^x(cos(x)-sin(x))=0`

`cos(x)-sin(x)=0`

`because `

`e^(x)!=0`

`Thus`

`tan(x)=1`

`x=npi+pi/4` and n is an integer.

Thus we have got points where tangents are parallel to horizontal.