1

I am trying to invert the series symbolically. Is this possible in Mathematica?

Example 1 -

Let $p = u + au^2 + bu^3$, where $a,b$ are symbolic variables. I am trying to invert the series around $u=0$ say up to $4$ th order. That is I am trying to get inverse series in terms of $p$ with coefficients in terms of $a,b$.

How do we manage this once we have two dimensional case?

Example 2 -

Suppose we have $$p = u + au^2 + b uv + cv^2$$ $$q = v + dv^2 + euv+ fv^2$$

I am trying to invert the series say upto $4$th order. That is I am trying to get the inverse series in terms of $p,q$. Like $$u = ()p + ()p^2 + ()q + ()q^2 + ()pq + \ldots$$ $$v = ()p + ()p^2 + ()q + ()pq + ()q^2 + \ldots$$, where the coefficients are in terms of $a,b,c,d,e,f$.

I was trying Inverse Series $[u + a u^2 + b u^3 , p]$ but seems like it is not working.

I tried defining a function like $f[u] = u + au^2 + bu^3$ and then using the inverse series Inverse Series$[f[u],p]$. Seems this is also not working.

Any help?

EDIT - Trying Carl Woll suggestions, still I am making mistake somewhere -

asymptoticSolve[args__] := CloudEvaluate[System`AsymptoticSolve[args]]
asymptoticSolve[{p == u + a u^2 + b u v + c v^2, 
  q == v + d u^2 + e u v + f v^2}, {{u, v}, {0, 0}}, {{p, q}, {0, 0}, 
  3}]

results into output

CloudEvaluate[
 AsymptoticSolve[{p == {u + u^2 + u v + c v^2, 
     u + 2 u^2 + 2 u v + c v^2, u + 3 u^2 + 3 u v + c v^2}, 
   q == d u^2 + v + e u v + v^2 Function[x, 4 x (1 - x)]}, {{u, 
    v}, {0, 0}}, {{p, q}, {0, 0}, 3}]]

Not sure why?

BAYMAX
  • 199
  • 7

3 Answers3

3

You can use the new in M12 function AsymptoticSolve for this:

AsymptoticSolve[
    {
    p == u + a u^2 + b u v + c v^2,
    q == v + d v^2 + e u v + f v^2
    }, 
    {{u, v}, {0, 0}},
    {{p, q}, {0, 0}, 3}
]

{{u -> p - a p^2 + 2 a^2 p^3 - b p q + (3 a b + b e) p^2 q - c q^2 + (b^2 + 2 a c + b d + 2 c e + b f) p q^2 + (b c + 2 c d + 2 c f) q^3, v -> q - e p q + (a e + e^2) p^2 q + (-d - f) q^2 + (b e + 3 d e + 3 e f) p q^2 + (2 d^2 + c e + 4 d f + 2 f^2) q^3}}

Carl Woll
  • 130,679
  • 6
  • 243
  • 355
  • There are several branches of u and v as functions of p and q. Does AsymptoticSolve take it into account? – user64494 Sep 27 '19 at 07:30
  • @user64494 The short answer is yes. If there are multiple branches, AsymptoticSolve will return multiple results. You can control which branch is being inverted by specifying an expansion point in the second argument of AsymptoticSolve as I did, although there may still be multiple roots in this case. – Carl Woll Sep 27 '19 at 14:54
  • Thank you. However, the command AsymptoticSolve[p == u + au^2 + bu^3, {u, 0}, {p, 0, 3}] performs only {{u -> p - a p^2 + (2 a^2 - b) p^3}}. – user64494 Sep 27 '19 at 15:43
  • @user64494 AsymptoticSolve is returning the only solution that passes through $u=0$ and $p=0$. If you want multiple branches, don't specify $u=0$, i.e., AsymptoticSolve[p == u + a u^2 + b u^3, u, {p, 0, 3}]. – Carl Woll Sep 27 '19 at 16:06
  • Seems like this is much helpful, but I am not sure why I am getting this output when I use asymptotic solve, any comments? I am getting output as: AsymptoticSolve[{p == {u + u^2 + u v + c v^2, u + 2 u^2 + 2 u v + c v^2, u + 3 u^2 + 3 u v + c v^2}, q == v + e u v + d v^2 + v^2 Function[x, 4 x (1 - x)]}, {{u, v}, {0, 0}}, {{p, q}, {0, 0}, 3}] – BAYMAX Sep 27 '19 at 22:27
  • i am unaware of writing it in code style, sorry. – BAYMAX Sep 27 '19 at 22:28
  • @BAYMAX As I said, it is a new in M12 function. Are you using M12? If not, you could try using the cloud by defining asymptoticSolve[args__] := CloudEvaluate[System`AsymptoticSolve[args]], and then using asymptoticSolve instead of AsymptoticSolve. – Carl Woll Sep 27 '19 at 22:34
  • Thank you @CarlWoll still can you please see the edit to the question? – BAYMAX Sep 27 '19 at 22:53
  • Unfortunately, the result of AsymptoticSolve[p == u + a u^2 + b u^3, u, {p, 0, 3}] is a complicated ConditionalExpression depending on the sign of -a^2 Sqrt[a^2 - 4 b] + (a^2 - 4 b)^(3/2) + 4 Sqrt[a^2 - 4 b] b. That result is not in accordance with the results of my answer. I think Solve makes nonequivalent transforms and Reduce doesn't. – user64494 Sep 28 '19 at 07:07
  • 1
    @user64494 Why do you think the answers disagree? If I feed some numbers in, e.g., {a->3, b->10} and FullSimplify your result, it agrees with mine. Can you find values of a and b where the results disagree? – Carl Woll Sep 28 '19 at 15:36
2

Example 1

Let's define series like this:

p[u_] := u + a u^2 + b u^3 + O[u]^4

Inversing series p gives:

q[x_] := Evaluate[InverseSeries[p[x], x]];
q[p]

$p-a p^2+p^3 \left(2 a^2-b\right)+O\left(p^4\right)$

Check that q is an inverse series for p:

q[p[u]]

$u+O\left(u^4\right)$

Example 2

I believe the solution that you are looking for is documented here.

Markhaim
  • 878
  • 4
  • 11
  • You wrote "I believe the solution that you are looking for is documented here". If I am not mistaken, there are no parameters in the latest example by @Michael E2. – user64494 Sep 27 '19 at 07:27
1

Let us consider your example 1 (I think example 2 can be done in future versions of Mathematica only.). There are several cases depending on parameters and four branches of u as a function of p up to the result of

s = Reduce[p == u + a*u^2 + b*u^3, u] // ToRadicals

(b != 0 && (u == -(a/(3 b)) - (2^(1/3) (-a^2 + 3 b))/( 3 b (-2 a^3 + 9 a b + 27 b^2 p + Sqrt[ 4 (-a^2 + 3 b)^3 + (-2 a^3 + 9 a b + 27 b^2 p)^2])^( 1/3)) + (-2 a^3 + 9 a b + 27 b^2 p + Sqrt[ 4 (-a^2 + 3 b)^3 + (-2 a^3 + 9 a b + 27 b^2 p)^2])^(1/3)/( 3 2^(1/3) b) || u == -(a/(3 b)) + ((1 + I Sqrt[3]) (-a^2 + 3 b))/( 3 2^(2/3) b (-2 a^3 + 9 a b + 27 b^2 p + Sqrt[ 4 (-a^2 + 3 b)^3 + (-2 a^3 + 9 a b + 27 b^2 p)^2])^( 1/3)) - ((1 - I Sqrt[3]) (-2 a^3 + 9 a b + 27 b^2 p + Sqrt[ 4 (-a^2 + 3 b)^3 + (-2 a^3 + 9 a b + 27 b^2 p)^2])^(1/3))/( 6 2^(1/3) b) || u == -(a/(3 b)) + ((1 - I Sqrt[3]) (-a^2 + 3 b))/( 3 2^(2/3) b (-2 a^3 + 9 a b + 27 b^2 p + Sqrt[ 4 (-a^2 + 3 b)^3 + (-2 a^3 + 9 a b + 27 b^2 p)^2])^( 1/3)) - ((1 + I Sqrt[3]) (-2 a^3 + 9 a b + 27 b^2 p + Sqrt[ 4 (-a^2 + 3 b)^3 + (-2 a^3 + 9 a b + 27 b^2 p)^2])^(1/3))/( 6 2^(1/3) b))) || (b == 0 && a == 0 && u == p) || (b == 0 && a != 0 && (u == (-1 - Sqrt[1 + 4 a p])/(2 a) || u == (-1 + Sqrt[1 + 4 a p])/(2 a)))

Let us consider the first case and the first branch. Then

Series[Part[s[[1, 2, 1]], 2], {p, 0, 4}]

does the job (A long output is omitted.).

user64494
  • 26,149
  • 4
  • 27
  • 56
  • 1
    Since you are concerned by the multiple solutions branches, you may be interested to look at this answer https://mathematica.stackexchange.com/questions/98467/how-can-i-get-the-solutions-of-xn-x-t-0-in-hypergeometric-form by @ChipHurst , which uses series expansion of the Root object. – yarchik Sep 27 '19 at 08:09
  • @yarchik: Thank you for a useful reference. – user64494 Sep 27 '19 at 08:12
  • You would get much simpler answers if you don't use ToRadicals. – Carl Woll Sep 28 '19 at 15:39