Formal power series: Difference between revisions

Content added Content deleted
Line 1,338: Line 1,338:
=={{header|Mathematica}}==
=={{header|Mathematica}}==
Mathematica natively supports symbolic power series. For example, this input demonstrates that the integral of the series of Cos minus the series for sin is zero to the order of cancellation.
Mathematica natively supports symbolic power series. For example, this input demonstrates that the integral of the series of Cos minus the series for sin is zero to the order of cancellation.
<lang Mathematica>
<lang Mathematica>cos = Series[Cos[x], {x, 0, 10}];
cos = Series[Cos[x], {x, 0, 10}];
sin = Series[Sin[x], {x, 0, 8}];
sin = Series[Sin[x], {x, 0, 8}];
sin - Integrate[cos, x]</lang>
sin - Integrate[cos, x]</lang>
{output}
{{out}}
<pre>O[x]^9</pre>
<pre>O[x]^9</pre>