# Finding series expansion in parametric setting

Suppose $y=f(x;p_1,p_2,...)$ and $t=g(x;p_1,p_2,...)$ are given where $p_1,p_2,...$ are some parameters. We want to find a series expansion of $y$ in terms of $t$. Is there a direct command or publicly available program for doing this?

-
Could you please think of a small concrete example to use as a guide ? – b.gatessucks Feb 26 '14 at 15:41
@b.gatessucks for example $y=p_1 x+ p_2 x^2$ and $t=\sin(x)+p_3x^3$ – Maesumi Feb 26 '14 at 16:38
I don't know under which conditions it can be done in general. In your specific example it might be possible to get t=t(y) as you can invert the first equation exactly. – b.gatessucks Feb 26 '14 at 16:52

I'm not sure how sound this solution is, but you can substitute x in f[x] with the inverse series of g[x] and then take the serie

fS[y_, t_, x_, xo_, n_] := With[{s = InverseSeries[Series[t, {x, xo, n}]]}, Series[ y /. x ->  s, {x, xo, n}]]

fS[p1 x + p2 x^2, Sin[x] + p3 x^3, x, 0, 4]


-

Not sure if this is what you are after, but could implicitly write all vars as functions of t, then take derivatives and solve for first few in y to form a Taylor series. For the given example it is as below.

exprs = {p1*x[t] + p2*x[t]^2 - y[t]
Sin[x[t]] + p3*x[t]^3 - t};
dexprs = D[exprs, t];
d2exprs = D[dexprs, t];

augexprs = Join[exprs, dexprs, d2exprs] /. t -> 0;

(* Out[766]= {p1 x[0] + p2 x[0]^2 + p3 x[0]^3 - Sin[x[0]] y[0], -1 +
p1 Derivative[1][x][0] + 2 p2 x[0] Derivative[1][x][0] +
3 p3 x[0]^2 Derivative[1][x][0] -
Cos[x[0]] y[0] Derivative[1][x][0] - Sin[x[0]] Derivative[1][y][0],
2 p2 Derivative[1][x][0]^2 + 6 p3 x[0] Derivative[1][x][0]^2 +
Sin[x[0]] y[0] Derivative[1][x][0]^2 -
2 Cos[x[0]] Derivative[1][x][0] Derivative[1][y][0] +
p1 (x^\[Prime]\[Prime])[0] + 2 p2 x[0] (x^\[Prime]\[Prime])[0] +
3 p3 x[0]^2 (x^\[Prime]\[Prime])[0] -
Cos[x[0]] y[0] (x^\[Prime]\[Prime])[0] -
Sin[x[0]] (y^\[Prime]\[Prime])[0]} *)

In[768]:=
y[0] + y'[0]*t + (y^\[Prime]\[Prime])[0]*t^2/2 /.
First[Solve[
augexprs == 0, {y[0],
Derivative[1][y][0], (y^\[Prime]\[Prime])[0]}]]

(* Out[768]=
p1 Csc[x[0]] x[0] + p2 Csc[x[0]] x[0]^2 + p3 Csc[x[0]] x[0]^3 +
t (-Csc[x[0]] + p1 Csc[x[0]] Derivative[1][x][0] +
2 p2 Csc[x[0]] x[0] Derivative[1][x][0] -
p1 Cot[x[0]] Csc[x[0]] x[0] Derivative[1][x][0] +
3 p3 Csc[x[0]] x[0]^2 Derivative[1][x][0] -
p2 Cot[x[0]] Csc[x[0]] x[0]^2 Derivative[1][x][0] -
p3 Cot[x[0]] Csc[x[0]] x[0]^3 Derivative[1][x][0]) +
1/2 t^2 (2 Cot[x[0]] Csc[x[0]] Derivative[1][x][0] +
2 p2 Csc[x[0]] Derivative[1][x][0]^2 -
2 p1 Cot[x[0]] Csc[x[0]] Derivative[1][x][0]^2 +
p1 Csc[x[0]] x[0] Derivative[1][x][0]^2 +
6 p3 Csc[x[0]] x[0] Derivative[1][x][0]^2 -
4 p2 Cot[x[0]] Csc[x[0]] x[0] Derivative[1][x][0]^2 +
2 p1 Cot[x[0]]^2 Csc[x[0]] x[0] Derivative[1][x][0]^2 +
p2 Csc[x[0]] x[0]^2 Derivative[1][x][0]^2 -
6 p3 Cot[x[0]] Csc[x[0]] x[0]^2 Derivative[1][x][0]^2 +
2 p2 Cot[x[0]]^2 Csc[x[0]] x[0]^2 Derivative[1][x][0]^2 +
p3 Csc[x[0]] x[0]^3 Derivative[1][x][0]^2 +
2 p3 Cot[x[0]]^2 Csc[x[0]] x[0]^3 Derivative[1][x][0]^2 +
p1 Csc[x[0]] (x^\[Prime]\[Prime])[0] +
2 p2 Csc[x[0]] x[0] (x^\[Prime]\[Prime])[0] -
p1 Cot[x[0]] Csc[x[0]] x[0] (x^\[Prime]\[Prime])[0] +
3 p3 Csc[x[0]] x[0]^2 (x^\[Prime]\[Prime])[0] -
p2 Cot[x[0]] Csc[x[0]] x[0]^2 (x^\[Prime]\[Prime])[0] -
p3 Cot[x[0]] Csc[x[0]] x[0]^3 (x^\[Prime]\[Prime])[0]) *)

-