I have a messy expression of variables that I would like to simplify under the assumption that certain ratios of the variables are small. For example, consider $\sqrt{x+y}\;$ expanded for small $\frac{y}{x}$. That is, $x >> y$. This is simple enough to do by hand (pull out a $\sqrt{x}$ and then define a new variable to be $\frac{y}{x}$, then expand this variable about $0$). But, I cannot figure out how to do it in Mathematica.
EDIT 1
I've since realized that what I actually want to do is more complicated than the example above. Consider the following expression $\sqrt{a+d} + \sqrt{b+d}\;$ expanded for small $\frac{d}{a}$ and small $\frac{d}{b}$ (that is $a>>d$ and $b>>d$). Following Artes' answer below, the solution is
Series[ (a + d)^(1/2) + (b + d)^(1/2) /. {d -> z1 a, d -> z2}, {z1, 0, 2},{z2, 0, 2}] /.
{z1 -> d/a, z2 -> d/b}
But this solution doesn't work as intended due to the order operations Mathematica performs upon this command. What needs to be done is to replace d
with z1 a
, then expand z1
about 0
, replace z1
with d/a
, then replace d
with z2 b
, expand z2
about 0
, and finally replace z2
with d/b
. How can one do this in Mathematica?
(Obviously the example I gave can be separated into two expressions when can be expanded separately, but this cannot be done for the more complicated expression I am actually trying to expand).
0.5
since it means (inMathematica
) a machine precission number unlike1/2
denoting an exact value. $\endgroup$