Professor's Approach:
f(x)=$xe^x$ f(1)=$e$ f'(x)=$e^x+xe^x$ f'(1)=$2e$ f''(x)=$2e^x+xe^x$ f''(1)=3e
Resulting Taylor Series: $e+2e(x-1)+3/2e(x-1)^2$
My Approach: Find the first degree Taylor Series for $e^x$ centered around a = 1
Let g(x)=$e^x$ $g^n(x)$ = $e^x$ Therefore all coefficients are e for a=1.
Result: $e+e(x-1)$
To find the second degree polynomial of $xe^x$ simply multiply the previous Taylor series by x.
Result: $ex^2$
The issue is that these two answers are not equivalent. However, graphically, both are attempting to approximate $e^x$ around x=1. Professor's Approach in Green, My Approach in Blue: graphical image
Although I probably will not get my points back for this midterm problem, I need some closure as to why my approach is incorrect(if it is). After all, I have seen my approach used for problems such as the Maclaurin series of $xcosx$.
Your final answer is centered at $0$, not at $1$ so it doesn't really make sense. It is also wrong as you are missing part of the second order term as you will see below. You take the first order Taylor series of $e^x$: $$ e^x = e + e(x-1) + O(x-1)^2$$ Multiplying by $x = 1 + (x-1)$ (so to get an answer centered at $1$) gives $$ xe^x = e + 2e(x-1) + e(x-1)^2 + O(x-1)^2.$$ But this is NOT what you want as you are still missing part of your order two term. You need a second order Taylor series for $e^x$: $$ e^x = e + e(x-1) + \frac{1}{2}e(x-1)^2 + O(x-1)^3. $$ Now when we multiply by $1 + (x-1)$ we get $$ xe^x = e + 2e(x-1) + \frac{3}{2}e(x-1)^2 + O(x-1)^3$$ as desired.