Question: Taylor series question

I've found the Taylor series expansions for two functions.  The two expansions are identical until the third term.  When I subtract one expansion from the other, I expected that the identical terms would cancel and disappear.  But I can't get Maple to do this.  If I copy and paste the output into a Maple command, the "big Oh" terms are not treated correctly.  The correct answer would be (x^3)/6 + O(x^4).  Here's my work:
 

taylor(ln(1+x), x = 0, 4)

series(x-(1/2)*x^2+(1/3)*x^3+O(x^4),x,4)

(1)

taylor(ln(1+sin(x)),x=0,4)

series(x-(1/2)*x^2+(1/6)*x^3+O(x^4),x,4)

(2)

 

(series(x-(1/2)*x^2+(1/3)*x^3+O(x^4),x,4))-(series(x-(1/2)*x^2+(1/6)*x^3+O(x^4),x,4))

(series(x-(1/2)*x^2+(1/3)*x^3+O(x^4),x,4))-(series(x-(1/2)*x^2+(1/6)*x^3+O(x^4),x,4))

(3)

collect((3),x)

(series(x-(1/2)*x^2+(1/3)*x^3+O(x^4),x,4))-(series(x-(1/2)*x^2+(1/6)*x^3+O(x^4),x,4))

(4)

x-(1/2)*x^2+(1/3)*x^3+O(x^4)-x+(1/2)*x^2-(1/6)*x^3-O(x^4)

(1/6)*x^3

(5)

x-(1/2)*x^2+(1/3)*x^3+O(x^4)-x+(1/2)*x^2-(1/6)*x^3-O(x^4)

(1/6)*x^3

(6)

``

How can I get Maple to give me the right answer?  I tried various commands (collect, combine, simplify, etc.) but nothing worked.  Also, why do the font and color of my first two commands differ?  Thanks
 

Download Taylor_question.mw

Please Wait...