I have to expand a series for Arctan near 0 using Mathematica or mupad in Matlab. However, it does not work. Please have a look at below expansions for t being small:
xx[t_] := t^2*x[2] + t^3*x[3] + t^4*x[4] + t^5*x[5] + t^6*x[6] + O[t]^7;
yy[t_] := y[0] + t* y[1] + t^2*y[2] + t^3*y[3] + t^4 * y[4] + t^5*y[5] +
t^6*y[6] + O[t]^7;
arc[t_] = ArcTan[(1 - yy[t])*Sqrt[k/xx[t]]]
arc2[t_] = Series[ArcTan[(1 - yy[t])*Sqrt[k/xx[t]]], {t, 0, 3}]
Mathematica does give me an answer for arc[] and arc2[]. But it is not what I wanted. It gives me FloorandArg in the answer.
I want just a series expansion of ArcTan around t=0 until order t^3 for small t.
When I type (1 - yy[t])*Sqrt[k/xx[t]] (*) , it gives me the series being order of t^(-1). We all know that
ArcTan [x] ~ x - x^3/3 + x^5/5 -x^7/7 + ... (**)
Now, because of this fact in (**) and the first term : t^(-1) term in (*) , arc2[t] expansion above should go until t^(-infinity) where t is small.
Could you please give me a hint for this : how to find arc2[] ? xx[t] and yy[t] are real valued. Maybe it recognises these as complex valued functions and that is why it gives floor and Arg in the answer.
If $f(x)=\tan^{-1}(a/x+b+cx + O(x^2))$ these are a few terms of the expansion
$O(x^0)$:
$$ f^{(0)}(0) = \lim_{x\to 0+}f(x) = \pi/2 $$
$O(x^1)$:
$$ f^{(1)}(0) = \lim_{x\to 0+}f'(x) = -\frac{1}{a} $$
$O(x^2)$:
$$ f^{(2)}(0) = \lim_{x\to 0+}f''(x) = \frac{2b}{a^2} $$
The Taylor expansion of $f(x)$ is then
$$ f(x) = \frac{\pi}{2} - \frac{x}{a} + \frac{bx^2}{a^2} + O(x^3) $$