0

How can I get the first non-zero term of a Taylor Series, when I don't know beforehand what power it will be? Example:

Series[Sin[a]^6],{a,0,6}]

returns $a^6$, but I have to know the order is 6. If I instead just say:

Series[Sin[a]^6],{a,0,1}]

I get back $O[a]^6$ but I don't know what command to use to extract the 6 from that to redo the Seres[] calculation.

The function I want would just work like this:

f[(Sin[a*Cos[a]]^7)*Cos[2a]^3]

$a^7$

Any ideas?

Jerry Guern
  • 4,602
  • 18
  • 47
  • I don't think your example f[(Sin[Cos[a]]^7)*Cos[2a]^3] is what you intended to write. – mikado Nov 05 '21 at 22:55
  • but I don't know what command to use to extract the 6 if you look at InputForm of what is returned from Series command, you'll see the form. Compare to what it says in help about it. It has all the info you want there. Therefore s = Series[Sin[a]^6, {a, 0, 6}]; s[[4]] gives 6. Same for s = Series[Sin[a]^6, {a, 0, 1}]; s[[4]] – Nasser Nov 05 '21 at 23:01

1 Answers1

1

Asymptotic (available from 12.1, I think) works for your first example:

Asymptotic[Sin[a]^6, a -> 0]
(* a^6 *)
mikado
  • 16,741
  • 2
  • 20
  • 54