Find the equation of the tangent to y=2-xe^x at the point where x=0

So I found the first derivative by doing the sum rule and product rule.
I got e^(x)(x-1)

Then I found the slope by substituting 0 for x and got -1.

Then I found y by substituting 0 into the original equation and got 2.

So for my final equation after finding b I had y=-1x+2

But in the back of the book the answer says x+y-2=0.

1 answer

You can simplify things right from the start by writing the equation for the tangent as:

Delta Y/DeltaX = y'

The derivative y' is to be evaluated at the point where you take the tangent, Delta Y and Delta x are the differences in the y and x coordinate relative to the values they take at the point where the tangent touches the graph of the function.