For each of the following functions, suggest a numerical stable way to evaluate $y$ for small $x$ in order to avoid loss of precision:
$y=x^2-\sin(x)^2$ - ignore terms of order $o(x^7$)
$y=\frac{x^2-\sin(x)^2}{2-\sqrt{x+4}}$ - ignore terms of order $o(x^6$)
$y=2x+e^x-e^{3x}$ - ignore terms of order $o(x^3$)
$y=\log(\frac{1+x}{1-x})$ - ignore terms of order $o(x^3)=O(x^4$)
$y=\sqrt{e^{-\frac{2}{3}x}-e^{-x}}$ - ignore terms of order $o(x)$
I have never seen something like this before even though I have been taking a course in numerical analysis. I have only been learning how to implement numerical methods. I was never taught why it was necessary, but I am familiar with the floating point architecture, rounding error, loss of precision by subtraction, etc. because I looked it up myself in order to make sense of why I had to learn all that stuff. Therefore I am not sure how to solve this problem properly. However, because of the specifications about ignoring some terms, I think the questioner wants me to do Taylor expansions of one or more terms for each function. But what does little and big o mean in this context? For instance what does $o(x^3)=O(x^4$) mean? Does it mean that I have to Taylor expand to degree 2 and that the error term is of order 3? If this is true, what is then the meaning of $o(x)$? Does it mean that I just have to replace some term with a constant? How do I generally identify what the problem is for each function? I mean what is the problem with evaluating $y=x^2-\sin(x)^2$ for small $x$? Is it that $\sin(x)$ will take on small values that may not be represented perfectly by the floating point architecture so we will get a rounding error? I hope my questions make sense and I will be very grateful for a clarifying answer.