# Invert a series with coefficients depending on x

Let's say I have the equation:

$$\qquad (8x^{15}+4x^{14}+\ldots)G^9 + (3x^{3}+\ldots)G^{8} + \ldots + (5x+4)G + x = x$$.

$$G$$ is an infinite series of $$x$$. I want to find the first 10 coefficients of $$G$$. How exactly should I use InverseSeries to do this?

I've tried:

InverseSeries[
Series[
8x^{15} + 4x^{14} + \ldots)G^9 + (3x^{3} + \ldots) G^{8} + \ldots + (5x+4)G + x,
{G, 0, 10}],
{x, 0, 10}]


For inversion of series with coefficients—given numbers, it works, but it doesn't work here.

• It would be helpful to provide a simple example. – Carl Woll Aug 29 '19 at 20:01
• We really need to see a Mathematica expression that actually evaluates, not an expression with mixed TeX and Mathematica syntax and missing terms. – m_goldberg Aug 29 '19 at 22:54
• @sdd, try simple InverseSeries[Series[8x^15 + 4x^14 + ...) G^9 + (3x^3 + ...) G^8 + ...,{G,0,10}]], then CoefficientList[%,G]. – Alx Aug 30 '19 at 3:46
• You need to provide an example that other people can evaluate. Speaking of which, by "$G$ is an infinite series of $x$", did you mean $G$ is actually $G(x)$? – J. M.'s technical difficulties Aug 30 '19 at 8:14

You can use the new in M12 function AsymptoticSolve for this purpose. Here is a random example:

eqn = (1 + x + x^2) g^3 + (2 + x - x^2) g^2 + g == 0;


Let's find the zeroth order approximation:

sol = Solve[eqn /. x->0, g]


{{g -> -1}, {g -> -1}, {g -> 0}}

Let's find the series expansion around -1 using AsymptoticSolve:

AsymptoticSolve[eqn, {g, -1}, {x, 0, 3}]


{{g -> -1 + 1/2 (1 - I Sqrt[7]) x + ((3 I + Sqrt[7]) x^2)/Sqrt[ 7] - ((-11 I + 21 Sqrt[7]) x^3)/(14 Sqrt[7])}, {g -> -1 + 1/2 (1 + I Sqrt[7]) x + ((-3 I + Sqrt[7]) x^2)/Sqrt[ 7] - ((11 I + 21 Sqrt[7]) x^3)/(14 Sqrt[7])}}

You can also not bother specifying the zeroth order approximation to g:

AsymptoticSolve[eqn, g, {x, 0, 3}]


{{g -> 0}, {g -> -1 + 1/2 (1 - I Sqrt[7]) x + ((3 I + Sqrt[7]) x^2)/Sqrt[ 7] - ((-11 I + 21 Sqrt[7]) x^3)/(14 Sqrt[7])}, {g -> -1 + 1/2 (1 + I Sqrt[7]) x + ((-3 I + Sqrt[7]) x^2)/Sqrt[ 7] - ((11 I + 21 Sqrt[7]) x^3)/(14 Sqrt[7])}}

If you are working with an earlier version of Mathematica, but have access to the cloud, then you can define:

asymptoticSolve[a__] := CloudEvaluate[SystemAsymptoticSolve[a]]


and then use asymptoticSolve instead of AsymptoticSolve.

• I need the exact coefficients, so I simply need to find the inverse of the LHS series. Though, the coefficients are not given numbers, but just some polynomials in x. This should just change the system of equations a bit, that is solved when finding the inverse. So, I am guessing there is a simple way using InverseSeries – sdd Aug 29 '19 at 21:23
• @sdd My answer returns a series expression for g in terms of x`. Isn't that what you asked for? – Carl Woll Aug 30 '19 at 18:29
• ok, you are right, but if we want to be precise, this series is not just asymptotic solution, not an exact one. – sdd Aug 30 '19 at 23:26
• @sdd Just because the name of the function has Asymptotic in it doesn't mean the output is an asymptotic expansion. For this particular example, the output is just an ordernary series expansion. – Carl Woll Aug 31 '19 at 2:28