# Expanding in powers of a fraction

Is it possible to expand a function f(x,y,z) in powers of 'x/y'?

I know how to expand in in powers of 'x', but it is not a explicit function of 'x/y', as a result I can not do expansion by renaming 'x/y' as a new variable and expand the function.

Any answers are highly appreciated.For example f could be as below:

(y+d)(1/z+ 6 x^2(z-z2)^2)/((z-z3)^2+4 x^2)^3/2

• It is really complicated but, ok I will try to provide a simpler example @MariuszIwaniuk – Holger Mate May 17 '18 at 12:54
• I've just added it @MariuszIwaniuk – Holger Mate May 17 '18 at 13:01
• I do not think this is possible in general. So e.g. (x+y) you want to expand as (x/y+1)y or what? – kiara May 17 '18 at 16:59
• Yes, I think your expansion is correct @kiara – Holger Mate May 17 '18 at 19:04

A Proposal: What about substituting r==x/y and r ->0

Test with known function g[x_, y_] = E^ArcTan[x/y - 1]

(Series[E^ArcTan[r - 1], {r, 0, 1}] // Normal) /. r -> x/y // Expand

(*   E^(-Pi/4) + (E^(-Pi/4) x)/(2 y)   *)


Substituting x==r*y and y==x/r yields the same result (expansion to second order).

(Series[g[r y , x/r ], {r, 0, 2}] // Normal) /. r -> x/y //
Simplify // Expand

(*   E^(-Pi/4) + (E^(-Pi/4) x)/(2 y)   *)


Now do the same with your function f

f[x_, y_] = (y + d) (1/z + 6 x^2 (z - z2)^2)/((z - z3)^2 + 4 x^2)^3/2


Edit: Variable r instead of z, since z is already in the function

(Series[f[r y, x/r], {r, 0, 0}] // Normal) // Simplify // Expand

(*   d/(2 z (z - z3)^6) + x/(2 r z (z - z3)^6)   *)


Backsubstitution for zero order

(Series[f[r y, x/r], {r, 0, 0}] // Normal) /. r -> x/y // FullSimplify

(*   (d + y)/(2 z (z - z3)^6)   *)


first order

(Series[f[r y, x/r], {r, 0, 1}] // Normal) // Simplify // Expand

(*   -((6 r x y^2)/(z (z - z3)^8)) + d/(2 z (z - z3)^6) +
x/(2 r z (z - z3)^6) + (3 r x y^2 z^2)/(z - z3)^6 -
(6 r x y^2 z z2)/(z - z3)^6 + (3 r x y^2 z2^2)/(z - z3)^6   *)


Or r backsubstituted

(Series[f[r y, x/r], {r, 0, 1}] // Normal) /. r -> x/y // FullSimplify

(*  (6 x^2 y (-2 + z (z - z2)^2 (z - z3)^2) + (d + y) (z - z3)^2)
/(2 z (z - z3)^8)   *)

• Note that I have z in my function and the way you used may leads to mistake – Holger Mate May 18 '18 at 8:06
• Oh, I didn't notice. I just correct my answer. – Akku14 May 18 '18 at 8:58
• I defined f[x_, y_] = (y + d) (1/z + 6 x^2 (z - z2)^2)/((z - z3)^2 + 4 x^2)^3/2 . Now comes the substitution r==x/y and therfore x==r*y and y==x/r. Exactly what I then applied f[x,y] becomes f[r y, x/r] under the substitution. – Akku14 May 18 '18 at 13:50