# What is the equation of the tangent line of f(x)=x^2e^(x-2)-xe^x at x=4?

Mar 15, 2016

$y = \left(24 {e}^{2} - 5 {e}^{4}\right) x + 16 {e}^{4} - 80 {e}^{2}$

#### Explanation:

$f \left(x\right) = {x}^{2} {e}^{x - 2} - x {e}^{x}$

$f ' \left(x\right) = 2 x {e}^{x - 2} + {x}^{2} {e}^{x - 2} - {e}^{x} - x {e}^{x}$

$f \left(4\right) = 16 {e}^{2} - 4 {e}^{4}$

$f ' \left(4\right) = 8 {e}^{2} + 16 {e}^{2} - {e}^{4} - 4 {e}^{4} = 24 {e}^{2} - 5 {e}^{4}$

tangent line eq: $y = f ' \left({x}_{0}\right) x + n$

$16 {e}^{2} - 4 {e}^{4} = 4 \left(24 {e}^{2} - 5 {e}^{4}\right) + n$

$n = 16 {e}^{2} - 4 {e}^{4} - 96 {e}^{2} + 20 {e}^{4} = 16 {e}^{4} - 80 {e}^{2}$

$y = \left(24 {e}^{2} - 5 {e}^{4}\right) x + 16 {e}^{4} - 80 {e}^{2}$