This gets pretty complicated if we work with the parameter so I'll show the main idea with l
set to 1.
I am using uncapitalized symbols since that is recommended practice.
pExpr = -(m*
rz) + (360*(l^2*rz^2 - 3*l*rz*uy + 3*uy^2) + (2*l^2*rz^2 +
30*l*ux - 3*l*rz*uy + 18*uy^2)^2)/(180*l^3) -
ux*v + ((l^2*(-12 + rz*(3 + 4*rz)) + 6*l*(6 + rz)*ux + 36*ux^2 +
60*l*uy - 3*l*(l*(-4 + rz) + 12*ux)*Cos[rz] -
3*l*(l*(16 + rz) + 12*ux - 6*l*Cos[rz])*Sin[rz])^2/4 +
360*(l^2*rz^2 + (3*l*rz*(l + 2*ux - l*(Cos[rz] + Sin[rz])))/
2 + (3*(l + 2*ux - l*(Cos[rz] + Sin[rz]))^2)/4))/(180*
l^3) /. l -> 1;
Here are some relevant definitions.
derivVars = {ux, uy, rz};
solveVars = {ux, uy, m};
indepVars = {rz, v};
We define some substitutions, first to make explicit dependencies of dependent on independent variables.
subst =
Thread[solveVars -> Map[Apply[#, indepVars] &, solveVars]]
(* Out[155]= {ux -> ux[rz, v], uy -> uy[rz, v], m -> m[rz, v]} *)
Then we use a "center" point for the expansions. I chose something away from the origin so as to get away from the initial values all being zero, but this seems not to be strictly necessary.
centerVal = {1, 1/2};
centerSubst = Thread[indepVars -> centerVal];
We start by taking derivatives with respect to the set of variables specified in the question. This gives three (nonlinear) equations in three unknowns.
derivs1 = D[pExpr, {derivVars, 1}];
We now plug in dependencies and solve at the center point for the variables of interest. I am doing this numerically so as to reduce size of results. I assume it is the real valued solution that is of interest so I select that one to work with.
solns0 = NSolve[(derivs1 /. subst /. centerSubst),
solveVars /. subst /. centerSubst];
realsolns = SelectFirst[solns0, FreeQ[#, Complex] &]
(* Out[157]= {ux[1, 1/2] -> -0.226565925725,
uy[1, 1/2] -> 0.521293098575, m[1, 1/2] -> 2.47566148214} *)
Since we are on a level set, derivatives of the expressions must vanish. So from here on we do implicit differentiation with respect to the independent variables, solve for the new derivatives after back substituting values for lower derivatives. So we successively build up our solution set. This is easy enough since now all equations are linear.
derivs2 = Flatten[D[derivs1 /. subst, {indepVars, 1}]];
solns1 = NSolve[derivs2 /. centerSubst /. realsolns][[1]]
realsolns = Join[realsolns, solns1];
(* Out[117]= {Derivative[0, 1][m][1, 1/2] -> 0.5049474410685676,
Derivative[0, 1][ux][1, 1/2] -> 0.04247077151821635,
Derivative[0, 1][uy][1, 1/2] -> -0.0021891966235871533,
Derivative[1, 0][m][1, 1/2] -> 3.035009091874597,
Derivative[1, 0][ux][1, 1/2] -> -0.5049474410685676,
Derivative[1, 0][uy][1, 1/2] -> 0.527428429008325} *)
Rinse and repeat:
derivs3 = Flatten[D[derivs2, {indepVars, 1}]];
solns2 = NSolve[(derivs3 /. centerSubst /. realsolns) == 0][[1]]
realsolns = Join[realsolns, solns2];
(* Out[122]= {Derivative[0, 2][m][1, 1/2] -> 0.0058561848991389885,
Derivative[0, 2][ux][1, 1/2] -> 0.0012407744471675428,
Derivative[0, 2][uy][1, 1/2] -> -0.0008707825473032442,
Derivative[1, 1][m][1, 1/2] -> 0.4689741977236943,
Derivative[1, 1][ux][1, 1/2] -> -0.005856184899138995,
Derivative[1, 1][uy][1, 1/2] -> -0.0029987473716603917,
Derivative[2, 0][m][1, 1/2] -> 2.0658369667032397,
Derivative[2, 0][ux][1, 1/2] -> -0.4689741977236943,
Derivative[2, 0][uy][1, 1/2] -> -0.025714139536380225} *)
If it is really important to get the parametrized result, we can start at the origin and then things are not so terrible because the initial solution is simple (all zeros). I'll just show the main steps, using Solve
now instead of the numeric version.
centerVal = {0, 0};
centerSubst = Thread[indepVars -> centerVal];
derivs1 = D[pExpr, {derivVars, 1}];
solns0 = Solve[(derivs1 /. subst /. centerSubst) == 0,
solveVars /. subst /. centerSubst];
realsolns = SelectFirst[solns0 /. l -> 1., FreeQ[#, Complex] &]
(* Out[282]= {ux[0, 0] -> 0, uy[0, 0] -> 0, m[0, 0] -> 0} *)
derivs2 = D[derivs1 /. subst, {indepVars, 1}];
newexpr = (derivs2 /. centerSubst /. realsolns);
solns1 = Solve[newexpr == 0,
Complement[Variables[newexpr], {l}]][[1]]
realsolns = Join[realsolns, solns1];
(* Out[272]= {Derivative[0, 1][m][0, 0] -> 0,
Derivative[0, 1][ux][0, 0] ->
l^3/(2*(6 + 5*l^2)), Derivative[0, 1][uy][0, 0] -> 0,
Derivative[1, 0][m][0, 0] -> 2/l,
Derivative[1, 0][ux][0, 0] -> 0,
Derivative[1, 0][uy][0, 0] -> l/2} *)
derivs3 = Flatten[D[derivs2, {indepVars, 1}]];
newexpr = (derivs3 /. centerSubst /. realsolns);
solns2 = Solve[newexpr == 0,
Complement[Variables[newexpr], {l}]][[1]]
realsolns = Join[realsolns, solns2];
(* Out[298]= {Derivative[0, 2][m][0, 0] -> 0,
Derivative[0, 2][ux][0, 0] -> 0,
Derivative[0, 2][uy][0, 0] -> -((3*l^7)/(2*(6 + 5*l^2)^3)),
Derivative[1, 1][m][0, 0] -> -((-9*l - 5*l^3)/(3*(6 + 5*l^2))),
Derivative[1, 1][ux][0, 0] -> 0, Derivative[1, 1][uy][0, 0] -> 0,
Derivative[2, 0][m][0, 0] -> 0, Derivative[2, 0][ux][0, 0] ->
-((9*l + 5*l^3)/(3*(6 + 5*l^2))), Derivative[2, 0][uy][0, 0] ->
(5*l^3)/(6*(6 + 5*l^2))} *)
Continue as far as needed...
Normal[Series[ g[x , y , z, w] /. Thread[{x, y, z, w} -> t*{x, y, z, w}], {t, 0, 3}]] /. t -> 1
$\endgroup${Ux,Uy,Rz}
, and equating them to zero. I would then like to approximate the solution of{Ux,Uy,M}
in terms of{Rz,V}
. $\endgroup$