3

I'm trying to get mathematicas series function to output a result that look like this:

enter image description here

instead of calculating the actual "values", like doing so here:

seriesfunc = Sin[x] Cos[x]/x
(* (Cos[x] Sin[x])/x *)

Series[seriesfunc, {x, 0, 5}]
(* 1-(2 x^2)/3+(2 x^4)/15+O[x]^6 *)

Is this possible? Yes, it is part of homework (or Calculus II exam actually), but I still think it's allowed here.

ybeltukov
  • 43,673
  • 5
  • 108
  • 212
Argo
  • 213
  • 1
  • 4

2 Answers2

10

I think SeriesCoefficient is what you want. Then you can use it to display formatted formulas

 series[expr_, x_, x0_] := Defer[expr = Sum[#, {n, 0, ∞}]] &[
  FullSimplify@SeriesCoefficient[expr, {x, x0, n}, Assumptions -> {n >= 0}] (x - x0)^n]

series[Sin[x] Cos[x]/x, x, 0]

enter image description here

ybeltukov
  • 43,673
  • 5
  • 108
  • 212
4

If you hit = in a clean cell twice the cell will turn into a Wolfram Alpha cell, and you can ask it using the English language. It will give you the series expansion as well as a series representation:

Taylor approximation through Wolfram Alpha

C. E.
  • 70,533
  • 6
  • 140
  • 264