Optimize distance from origin to point on superellipsoid

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












I've been trying to solve this problem with a couple of methods so far (including Lagrange multipliers) but for each method I end up with an unsolvable equation.



My first approach (Lagrange multipliers) starts off with optimizing $x^2+y^2+z^2$ constrained to $left(left|dfracxaright|^r+left|dfracybright|^rright)^fractr+left|dfraczcright|^t-1 = 0$ where $a$, $b$, $c$, $r$, and $t$ are variables that tweak the shape of the superellipsoid. From there, I go from this:



$$
beginbmatrix
dfracpartialpartial xleft(x^2 + y^2 + z^2 - lambdaleft(left(left|dfracxaright|^r+left|dfracybright|^rright)^fractr+left|dfraczcright|^t-1right)right)\
dfracpartialpartial yleft(x^2 + y^2 + z^2 - lambdaleft(left(left|dfracxaright|^r+left|dfracybright|^rright)^fractr+left|dfraczcright|^t-1right)right)\
dfracpartialpartial zleft(x^2 + y^2 + z^2 - lambdaleft(left(left|dfracxaright|^r+left|dfracybright|^rright)^fractr+left|dfraczcright|^t-1right)right)\
dfracpartialpartiallambdaleft(x^2 + y^2 + z^2 - lambdaleft(left(left|dfracxaright|^r+left|dfracybright|^rright)^fractr+left|dfraczcright|^t-1right)right)
endbmatrix
=
beginbmatrix
0\0\0\0
endbmatrix
$$
to
$$
beginbmatrix
2x - dfractrlambdaleft(left(dfracxaright)^r+left(dfracybright)^rright)^dfract-rrdfracx^r-1a^r\
2y - dfractrlambdaleft(left(dfracxaright)^r+left(dfracybright)^rright)^dfract-rrdfracy^r-1b^r\
2z-dfractlambdac^tz^t-1\
left(left(dfracxaright)^r+left(dfracybright)^rright)^fractr+left(dfraczcright)^t-1
endbmatrix
=
beginbmatrix
0\0\0\0
endbmatrix
$$
to
$$
begincases
2x - dfractr2z^2-tc^tt^-1left(left(dfracxaright)^r+left(dfracybright)^rright)^dfract-rrdfracx^r-1a^r=0\
2y - dfractr2z^2-tc^tt^-1left(left(dfracxaright)^r+left(dfracybright)^rright)^dfract-rrdfracy^r-1b^r=0\
left(left(dfracxaright)^r+left(dfracybright)^rright)^fractr+left(dfraczcright)^t=1
endcases
$$
where I'm pretty much stuck, and sympy won't help.



My second attempt is converting the implicit equation of a superellipsoid into its polar form, then using implicit differentiation to get $dfracpartial rpartialtheta = 0$ and $dfracpartial rpartialtheta=0$. I get:
$$
left(left(dfracr sintheta cosphiaright)^n + left(dfracr sinphi sinthetabright)^nright)^fractn + left(dfracr costhetacright)^t = 1
$$
and sympy gives me:
$$
begincases
fracr left(left(fracr cosleft (theta right )cright)^t sin^2left (theta right ) - left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractn cos^2left (theta right )right)left(left(fracr cosleft (theta right )cright)^t + left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractnright) sinleft (theta right ) cosleft (theta right ) = 0 \
fracr left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n sin^2left (phi right ) - left(fracr sinleft (phi right ) sinleft (theta right )bright)^n cos^2left (phi right )right) left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractnleft(left(fracr cosleft (theta right )cright)^t left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr cosleft (theta right )cright)^t left(fracr sinleft (phi right ) sinleft (theta right )bright)^n + left(fracr sinleft (theta right ) cosleft (phi right )aright)^n left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractn + left(fracr sinleft (phi right ) sinleft (theta right )bright)^n left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractnright) sinleft (phi right ) cosleft (phi right ) = 0
endcases
$$
which boils down to:
$$
begincases
left(fracr cosleft (theta right )cright)^t sin^2left (theta right ) = left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractn cos^2left (theta right ) \
begincases
left(fracr sinleft (theta right ) cosleft (phi right )aright)^n sin^2left (phi right ) = left(fracr sinleft (phi right ) sinleft (theta right )bright)^n cos^2left (phi right ) \
or \
left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^n = 0
endcases
endcases
$$
at which point sympy won't help once again, and I've no idea how to solve for $theta$ and $phi$.
Anyways, has someone got an alternative method for solving this? Or is it just me who can't solve the equations?







share|cite|improve this question




















  • I am pretty sure it is not just you that can't solve the equations :-)
    – Rolazaro Azeveires
    Aug 8 at 20:19










  • This is not a superellipsoid, is it ?
    – Yves Daoust
    Aug 8 at 20:32










  • You have the obvious solutions $x=y=0,z=pm c$, don't you ?
    – Yves Daoust
    Aug 8 at 20:36










  • The original superellipse(oid) was the simpler $$left|fracxaright|^t +left|fracybright|^t +left|fraczcright|^t = 1 $$ I remember they did discuss revolving a superellipse around one axis to get a solid. Maybe that is what you are generalizing with your letter $r$
    – Will Jagy
    Aug 8 at 21:00















up vote
2
down vote

favorite












I've been trying to solve this problem with a couple of methods so far (including Lagrange multipliers) but for each method I end up with an unsolvable equation.



My first approach (Lagrange multipliers) starts off with optimizing $x^2+y^2+z^2$ constrained to $left(left|dfracxaright|^r+left|dfracybright|^rright)^fractr+left|dfraczcright|^t-1 = 0$ where $a$, $b$, $c$, $r$, and $t$ are variables that tweak the shape of the superellipsoid. From there, I go from this:



$$
beginbmatrix
dfracpartialpartial xleft(x^2 + y^2 + z^2 - lambdaleft(left(left|dfracxaright|^r+left|dfracybright|^rright)^fractr+left|dfraczcright|^t-1right)right)\
dfracpartialpartial yleft(x^2 + y^2 + z^2 - lambdaleft(left(left|dfracxaright|^r+left|dfracybright|^rright)^fractr+left|dfraczcright|^t-1right)right)\
dfracpartialpartial zleft(x^2 + y^2 + z^2 - lambdaleft(left(left|dfracxaright|^r+left|dfracybright|^rright)^fractr+left|dfraczcright|^t-1right)right)\
dfracpartialpartiallambdaleft(x^2 + y^2 + z^2 - lambdaleft(left(left|dfracxaright|^r+left|dfracybright|^rright)^fractr+left|dfraczcright|^t-1right)right)
endbmatrix
=
beginbmatrix
0\0\0\0
endbmatrix
$$
to
$$
beginbmatrix
2x - dfractrlambdaleft(left(dfracxaright)^r+left(dfracybright)^rright)^dfract-rrdfracx^r-1a^r\
2y - dfractrlambdaleft(left(dfracxaright)^r+left(dfracybright)^rright)^dfract-rrdfracy^r-1b^r\
2z-dfractlambdac^tz^t-1\
left(left(dfracxaright)^r+left(dfracybright)^rright)^fractr+left(dfraczcright)^t-1
endbmatrix
=
beginbmatrix
0\0\0\0
endbmatrix
$$
to
$$
begincases
2x - dfractr2z^2-tc^tt^-1left(left(dfracxaright)^r+left(dfracybright)^rright)^dfract-rrdfracx^r-1a^r=0\
2y - dfractr2z^2-tc^tt^-1left(left(dfracxaright)^r+left(dfracybright)^rright)^dfract-rrdfracy^r-1b^r=0\
left(left(dfracxaright)^r+left(dfracybright)^rright)^fractr+left(dfraczcright)^t=1
endcases
$$
where I'm pretty much stuck, and sympy won't help.



My second attempt is converting the implicit equation of a superellipsoid into its polar form, then using implicit differentiation to get $dfracpartial rpartialtheta = 0$ and $dfracpartial rpartialtheta=0$. I get:
$$
left(left(dfracr sintheta cosphiaright)^n + left(dfracr sinphi sinthetabright)^nright)^fractn + left(dfracr costhetacright)^t = 1
$$
and sympy gives me:
$$
begincases
fracr left(left(fracr cosleft (theta right )cright)^t sin^2left (theta right ) - left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractn cos^2left (theta right )right)left(left(fracr cosleft (theta right )cright)^t + left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractnright) sinleft (theta right ) cosleft (theta right ) = 0 \
fracr left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n sin^2left (phi right ) - left(fracr sinleft (phi right ) sinleft (theta right )bright)^n cos^2left (phi right )right) left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractnleft(left(fracr cosleft (theta right )cright)^t left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr cosleft (theta right )cright)^t left(fracr sinleft (phi right ) sinleft (theta right )bright)^n + left(fracr sinleft (theta right ) cosleft (phi right )aright)^n left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractn + left(fracr sinleft (phi right ) sinleft (theta right )bright)^n left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractnright) sinleft (phi right ) cosleft (phi right ) = 0
endcases
$$
which boils down to:
$$
begincases
left(fracr cosleft (theta right )cright)^t sin^2left (theta right ) = left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractn cos^2left (theta right ) \
begincases
left(fracr sinleft (theta right ) cosleft (phi right )aright)^n sin^2left (phi right ) = left(fracr sinleft (phi right ) sinleft (theta right )bright)^n cos^2left (phi right ) \
or \
left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^n = 0
endcases
endcases
$$
at which point sympy won't help once again, and I've no idea how to solve for $theta$ and $phi$.
Anyways, has someone got an alternative method for solving this? Or is it just me who can't solve the equations?







share|cite|improve this question




















  • I am pretty sure it is not just you that can't solve the equations :-)
    – Rolazaro Azeveires
    Aug 8 at 20:19










  • This is not a superellipsoid, is it ?
    – Yves Daoust
    Aug 8 at 20:32










  • You have the obvious solutions $x=y=0,z=pm c$, don't you ?
    – Yves Daoust
    Aug 8 at 20:36










  • The original superellipse(oid) was the simpler $$left|fracxaright|^t +left|fracybright|^t +left|fraczcright|^t = 1 $$ I remember they did discuss revolving a superellipse around one axis to get a solid. Maybe that is what you are generalizing with your letter $r$
    – Will Jagy
    Aug 8 at 21:00













up vote
2
down vote

favorite









up vote
2
down vote

favorite











I've been trying to solve this problem with a couple of methods so far (including Lagrange multipliers) but for each method I end up with an unsolvable equation.



My first approach (Lagrange multipliers) starts off with optimizing $x^2+y^2+z^2$ constrained to $left(left|dfracxaright|^r+left|dfracybright|^rright)^fractr+left|dfraczcright|^t-1 = 0$ where $a$, $b$, $c$, $r$, and $t$ are variables that tweak the shape of the superellipsoid. From there, I go from this:



$$
beginbmatrix
dfracpartialpartial xleft(x^2 + y^2 + z^2 - lambdaleft(left(left|dfracxaright|^r+left|dfracybright|^rright)^fractr+left|dfraczcright|^t-1right)right)\
dfracpartialpartial yleft(x^2 + y^2 + z^2 - lambdaleft(left(left|dfracxaright|^r+left|dfracybright|^rright)^fractr+left|dfraczcright|^t-1right)right)\
dfracpartialpartial zleft(x^2 + y^2 + z^2 - lambdaleft(left(left|dfracxaright|^r+left|dfracybright|^rright)^fractr+left|dfraczcright|^t-1right)right)\
dfracpartialpartiallambdaleft(x^2 + y^2 + z^2 - lambdaleft(left(left|dfracxaright|^r+left|dfracybright|^rright)^fractr+left|dfraczcright|^t-1right)right)
endbmatrix
=
beginbmatrix
0\0\0\0
endbmatrix
$$
to
$$
beginbmatrix
2x - dfractrlambdaleft(left(dfracxaright)^r+left(dfracybright)^rright)^dfract-rrdfracx^r-1a^r\
2y - dfractrlambdaleft(left(dfracxaright)^r+left(dfracybright)^rright)^dfract-rrdfracy^r-1b^r\
2z-dfractlambdac^tz^t-1\
left(left(dfracxaright)^r+left(dfracybright)^rright)^fractr+left(dfraczcright)^t-1
endbmatrix
=
beginbmatrix
0\0\0\0
endbmatrix
$$
to
$$
begincases
2x - dfractr2z^2-tc^tt^-1left(left(dfracxaright)^r+left(dfracybright)^rright)^dfract-rrdfracx^r-1a^r=0\
2y - dfractr2z^2-tc^tt^-1left(left(dfracxaright)^r+left(dfracybright)^rright)^dfract-rrdfracy^r-1b^r=0\
left(left(dfracxaright)^r+left(dfracybright)^rright)^fractr+left(dfraczcright)^t=1
endcases
$$
where I'm pretty much stuck, and sympy won't help.



My second attempt is converting the implicit equation of a superellipsoid into its polar form, then using implicit differentiation to get $dfracpartial rpartialtheta = 0$ and $dfracpartial rpartialtheta=0$. I get:
$$
left(left(dfracr sintheta cosphiaright)^n + left(dfracr sinphi sinthetabright)^nright)^fractn + left(dfracr costhetacright)^t = 1
$$
and sympy gives me:
$$
begincases
fracr left(left(fracr cosleft (theta right )cright)^t sin^2left (theta right ) - left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractn cos^2left (theta right )right)left(left(fracr cosleft (theta right )cright)^t + left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractnright) sinleft (theta right ) cosleft (theta right ) = 0 \
fracr left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n sin^2left (phi right ) - left(fracr sinleft (phi right ) sinleft (theta right )bright)^n cos^2left (phi right )right) left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractnleft(left(fracr cosleft (theta right )cright)^t left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr cosleft (theta right )cright)^t left(fracr sinleft (phi right ) sinleft (theta right )bright)^n + left(fracr sinleft (theta right ) cosleft (phi right )aright)^n left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractn + left(fracr sinleft (phi right ) sinleft (theta right )bright)^n left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractnright) sinleft (phi right ) cosleft (phi right ) = 0
endcases
$$
which boils down to:
$$
begincases
left(fracr cosleft (theta right )cright)^t sin^2left (theta right ) = left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractn cos^2left (theta right ) \
begincases
left(fracr sinleft (theta right ) cosleft (phi right )aright)^n sin^2left (phi right ) = left(fracr sinleft (phi right ) sinleft (theta right )bright)^n cos^2left (phi right ) \
or \
left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^n = 0
endcases
endcases
$$
at which point sympy won't help once again, and I've no idea how to solve for $theta$ and $phi$.
Anyways, has someone got an alternative method for solving this? Or is it just me who can't solve the equations?







share|cite|improve this question












I've been trying to solve this problem with a couple of methods so far (including Lagrange multipliers) but for each method I end up with an unsolvable equation.



My first approach (Lagrange multipliers) starts off with optimizing $x^2+y^2+z^2$ constrained to $left(left|dfracxaright|^r+left|dfracybright|^rright)^fractr+left|dfraczcright|^t-1 = 0$ where $a$, $b$, $c$, $r$, and $t$ are variables that tweak the shape of the superellipsoid. From there, I go from this:



$$
beginbmatrix
dfracpartialpartial xleft(x^2 + y^2 + z^2 - lambdaleft(left(left|dfracxaright|^r+left|dfracybright|^rright)^fractr+left|dfraczcright|^t-1right)right)\
dfracpartialpartial yleft(x^2 + y^2 + z^2 - lambdaleft(left(left|dfracxaright|^r+left|dfracybright|^rright)^fractr+left|dfraczcright|^t-1right)right)\
dfracpartialpartial zleft(x^2 + y^2 + z^2 - lambdaleft(left(left|dfracxaright|^r+left|dfracybright|^rright)^fractr+left|dfraczcright|^t-1right)right)\
dfracpartialpartiallambdaleft(x^2 + y^2 + z^2 - lambdaleft(left(left|dfracxaright|^r+left|dfracybright|^rright)^fractr+left|dfraczcright|^t-1right)right)
endbmatrix
=
beginbmatrix
0\0\0\0
endbmatrix
$$
to
$$
beginbmatrix
2x - dfractrlambdaleft(left(dfracxaright)^r+left(dfracybright)^rright)^dfract-rrdfracx^r-1a^r\
2y - dfractrlambdaleft(left(dfracxaright)^r+left(dfracybright)^rright)^dfract-rrdfracy^r-1b^r\
2z-dfractlambdac^tz^t-1\
left(left(dfracxaright)^r+left(dfracybright)^rright)^fractr+left(dfraczcright)^t-1
endbmatrix
=
beginbmatrix
0\0\0\0
endbmatrix
$$
to
$$
begincases
2x - dfractr2z^2-tc^tt^-1left(left(dfracxaright)^r+left(dfracybright)^rright)^dfract-rrdfracx^r-1a^r=0\
2y - dfractr2z^2-tc^tt^-1left(left(dfracxaright)^r+left(dfracybright)^rright)^dfract-rrdfracy^r-1b^r=0\
left(left(dfracxaright)^r+left(dfracybright)^rright)^fractr+left(dfraczcright)^t=1
endcases
$$
where I'm pretty much stuck, and sympy won't help.



My second attempt is converting the implicit equation of a superellipsoid into its polar form, then using implicit differentiation to get $dfracpartial rpartialtheta = 0$ and $dfracpartial rpartialtheta=0$. I get:
$$
left(left(dfracr sintheta cosphiaright)^n + left(dfracr sinphi sinthetabright)^nright)^fractn + left(dfracr costhetacright)^t = 1
$$
and sympy gives me:
$$
begincases
fracr left(left(fracr cosleft (theta right )cright)^t sin^2left (theta right ) - left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractn cos^2left (theta right )right)left(left(fracr cosleft (theta right )cright)^t + left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractnright) sinleft (theta right ) cosleft (theta right ) = 0 \
fracr left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n sin^2left (phi right ) - left(fracr sinleft (phi right ) sinleft (theta right )bright)^n cos^2left (phi right )right) left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractnleft(left(fracr cosleft (theta right )cright)^t left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr cosleft (theta right )cright)^t left(fracr sinleft (phi right ) sinleft (theta right )bright)^n + left(fracr sinleft (theta right ) cosleft (phi right )aright)^n left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractn + left(fracr sinleft (phi right ) sinleft (theta right )bright)^n left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractnright) sinleft (phi right ) cosleft (phi right ) = 0
endcases
$$
which boils down to:
$$
begincases
left(fracr cosleft (theta right )cright)^t sin^2left (theta right ) = left(left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^nright)^fractn cos^2left (theta right ) \
begincases
left(fracr sinleft (theta right ) cosleft (phi right )aright)^n sin^2left (phi right ) = left(fracr sinleft (phi right ) sinleft (theta right )bright)^n cos^2left (phi right ) \
or \
left(fracr sinleft (theta right ) cosleft (phi right )aright)^n + left(fracr sinleft (phi right ) sinleft (theta right )bright)^n = 0
endcases
endcases
$$
at which point sympy won't help once again, and I've no idea how to solve for $theta$ and $phi$.
Anyways, has someone got an alternative method for solving this? Or is it just me who can't solve the equations?









share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Aug 8 at 20:11









Toby Mueller

112




112











  • I am pretty sure it is not just you that can't solve the equations :-)
    – Rolazaro Azeveires
    Aug 8 at 20:19










  • This is not a superellipsoid, is it ?
    – Yves Daoust
    Aug 8 at 20:32










  • You have the obvious solutions $x=y=0,z=pm c$, don't you ?
    – Yves Daoust
    Aug 8 at 20:36










  • The original superellipse(oid) was the simpler $$left|fracxaright|^t +left|fracybright|^t +left|fraczcright|^t = 1 $$ I remember they did discuss revolving a superellipse around one axis to get a solid. Maybe that is what you are generalizing with your letter $r$
    – Will Jagy
    Aug 8 at 21:00

















  • I am pretty sure it is not just you that can't solve the equations :-)
    – Rolazaro Azeveires
    Aug 8 at 20:19










  • This is not a superellipsoid, is it ?
    – Yves Daoust
    Aug 8 at 20:32










  • You have the obvious solutions $x=y=0,z=pm c$, don't you ?
    – Yves Daoust
    Aug 8 at 20:36










  • The original superellipse(oid) was the simpler $$left|fracxaright|^t +left|fracybright|^t +left|fraczcright|^t = 1 $$ I remember they did discuss revolving a superellipse around one axis to get a solid. Maybe that is what you are generalizing with your letter $r$
    – Will Jagy
    Aug 8 at 21:00
















I am pretty sure it is not just you that can't solve the equations :-)
– Rolazaro Azeveires
Aug 8 at 20:19




I am pretty sure it is not just you that can't solve the equations :-)
– Rolazaro Azeveires
Aug 8 at 20:19












This is not a superellipsoid, is it ?
– Yves Daoust
Aug 8 at 20:32




This is not a superellipsoid, is it ?
– Yves Daoust
Aug 8 at 20:32












You have the obvious solutions $x=y=0,z=pm c$, don't you ?
– Yves Daoust
Aug 8 at 20:36




You have the obvious solutions $x=y=0,z=pm c$, don't you ?
– Yves Daoust
Aug 8 at 20:36












The original superellipse(oid) was the simpler $$left|fracxaright|^t +left|fracybright|^t +left|fraczcright|^t = 1 $$ I remember they did discuss revolving a superellipse around one axis to get a solid. Maybe that is what you are generalizing with your letter $r$
– Will Jagy
Aug 8 at 21:00





The original superellipse(oid) was the simpler $$left|fracxaright|^t +left|fracybright|^t +left|fraczcright|^t = 1 $$ I remember they did discuss revolving a superellipse around one axis to get a solid. Maybe that is what you are generalizing with your letter $r$
– Will Jagy
Aug 8 at 21:00











1 Answer
1






active

oldest

votes

















up vote
1
down vote













Use the change of variable



$$left(frac xaright)^r=rho^r/tcos^2theta,
\left(frac ybright)^r=rho^r/tsin^2theta.$$



Then the constraint becomes



$$rho+left(frac zcright)^t-1=0$$ or



$$z=c(1-rho)^1/t.$$



The function to be maximized is now



$$rho^2/t(a^2cos^4/rtheta+b^2sin^4/rtheta)+c^2(1-rho)^2/t.$$



Differentiating on $theta$ and canceling,



$$-a^2sinthetacos^4/r-1theta+b^2costhetasin^4/r-1theta=0$$ or



$$tan^4/r-2theta=fraca^2b^2$$ gives you the solutions in $theta$.



And differentiating on $rho$,



$$rho^2/t-1(a^2cos^4/rtheta+b^2sin^4/rtheta)-c^2(1-rho)^2/t-1$$



gives



$$frac1-rhorho=left(fraca^2cos^4/rtheta+b^2sin^4/rthetac^2right)^t/(2-t).$$






share|cite|improve this answer






















    Your Answer




    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    );
    );
    , "mathjax-editing");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "69"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2876537%2foptimize-distance-from-origin-to-point-on-superellipsoid%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    Use the change of variable



    $$left(frac xaright)^r=rho^r/tcos^2theta,
    \left(frac ybright)^r=rho^r/tsin^2theta.$$



    Then the constraint becomes



    $$rho+left(frac zcright)^t-1=0$$ or



    $$z=c(1-rho)^1/t.$$



    The function to be maximized is now



    $$rho^2/t(a^2cos^4/rtheta+b^2sin^4/rtheta)+c^2(1-rho)^2/t.$$



    Differentiating on $theta$ and canceling,



    $$-a^2sinthetacos^4/r-1theta+b^2costhetasin^4/r-1theta=0$$ or



    $$tan^4/r-2theta=fraca^2b^2$$ gives you the solutions in $theta$.



    And differentiating on $rho$,



    $$rho^2/t-1(a^2cos^4/rtheta+b^2sin^4/rtheta)-c^2(1-rho)^2/t-1$$



    gives



    $$frac1-rhorho=left(fraca^2cos^4/rtheta+b^2sin^4/rthetac^2right)^t/(2-t).$$






    share|cite|improve this answer


























      up vote
      1
      down vote













      Use the change of variable



      $$left(frac xaright)^r=rho^r/tcos^2theta,
      \left(frac ybright)^r=rho^r/tsin^2theta.$$



      Then the constraint becomes



      $$rho+left(frac zcright)^t-1=0$$ or



      $$z=c(1-rho)^1/t.$$



      The function to be maximized is now



      $$rho^2/t(a^2cos^4/rtheta+b^2sin^4/rtheta)+c^2(1-rho)^2/t.$$



      Differentiating on $theta$ and canceling,



      $$-a^2sinthetacos^4/r-1theta+b^2costhetasin^4/r-1theta=0$$ or



      $$tan^4/r-2theta=fraca^2b^2$$ gives you the solutions in $theta$.



      And differentiating on $rho$,



      $$rho^2/t-1(a^2cos^4/rtheta+b^2sin^4/rtheta)-c^2(1-rho)^2/t-1$$



      gives



      $$frac1-rhorho=left(fraca^2cos^4/rtheta+b^2sin^4/rthetac^2right)^t/(2-t).$$






      share|cite|improve this answer
























        up vote
        1
        down vote










        up vote
        1
        down vote









        Use the change of variable



        $$left(frac xaright)^r=rho^r/tcos^2theta,
        \left(frac ybright)^r=rho^r/tsin^2theta.$$



        Then the constraint becomes



        $$rho+left(frac zcright)^t-1=0$$ or



        $$z=c(1-rho)^1/t.$$



        The function to be maximized is now



        $$rho^2/t(a^2cos^4/rtheta+b^2sin^4/rtheta)+c^2(1-rho)^2/t.$$



        Differentiating on $theta$ and canceling,



        $$-a^2sinthetacos^4/r-1theta+b^2costhetasin^4/r-1theta=0$$ or



        $$tan^4/r-2theta=fraca^2b^2$$ gives you the solutions in $theta$.



        And differentiating on $rho$,



        $$rho^2/t-1(a^2cos^4/rtheta+b^2sin^4/rtheta)-c^2(1-rho)^2/t-1$$



        gives



        $$frac1-rhorho=left(fraca^2cos^4/rtheta+b^2sin^4/rthetac^2right)^t/(2-t).$$






        share|cite|improve this answer














        Use the change of variable



        $$left(frac xaright)^r=rho^r/tcos^2theta,
        \left(frac ybright)^r=rho^r/tsin^2theta.$$



        Then the constraint becomes



        $$rho+left(frac zcright)^t-1=0$$ or



        $$z=c(1-rho)^1/t.$$



        The function to be maximized is now



        $$rho^2/t(a^2cos^4/rtheta+b^2sin^4/rtheta)+c^2(1-rho)^2/t.$$



        Differentiating on $theta$ and canceling,



        $$-a^2sinthetacos^4/r-1theta+b^2costhetasin^4/r-1theta=0$$ or



        $$tan^4/r-2theta=fraca^2b^2$$ gives you the solutions in $theta$.



        And differentiating on $rho$,



        $$rho^2/t-1(a^2cos^4/rtheta+b^2sin^4/rtheta)-c^2(1-rho)^2/t-1$$



        gives



        $$frac1-rhorho=left(fraca^2cos^4/rtheta+b^2sin^4/rthetac^2right)^t/(2-t).$$







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Aug 8 at 21:26

























        answered Aug 8 at 21:03









        Yves Daoust

        112k665205




        112k665205






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2876537%2foptimize-distance-from-origin-to-point-on-superellipsoid%23new-answer', 'question_page');

            );

            Post as a guest













































































            這個網誌中的熱門文章

            How to combine Bézier curves to a surface?

            Mutual Information Always Non-negative

            Why am i infinitely getting the same tweet with the Twitter Search API?