-2
$\begingroup$

EDIT1:

I am trying to analytically obtain an equations $ r=f(\theta), \psi=g(\theta) $ of an eccentric circle in polar coordinates from its ode with NDSolve using DSolve for such a conversion. I would like to obtain the functions after integration in Dido's problem.

Dido Isoperimetric Prob

I find it difficult to code pure $ r=f(\theta) $ without necessarily involving $ \psi= g(\theta). $

Starting with arc length ODE of a circle $$ \frac{d\psi}{ds}= \frac {(r^2+c^2)}{2 \lambda}; $$

converted to polar coordinate $ \theta$ independent variable

$$ \frac{d\psi}{d\theta}= \frac {(r^2+c^2)}{2 \lambda r \sin \psi }\; ;\frac{dr}{d\theta}= r \cot(\psi);$$

For excluding origin from the circle the power of circle we have $c^2>0$ and to include $c^2 <0$.

enter image description here

Circles configured on Pythagorean triplets $(3,4,5)$ shown. Boundary conditions for Circle center on x-axis.

$ \theta =0, r= \text { Centre displacement } = \sqrt{c^2 \pm \lambda^2} (\; c > \lambda ) $

Origin outside Circle : $r= \sqrt{ \lambda^2 +c^2}\pm \lambda$

Origin inside Circle : $r= \sqrt{ \lambda^2-c^2}\pm \lambda$

" ~~~~~ Ecc Circ Polar Coord RIGHT SIDE~~~~ "

Clear["Global`"]; "CIRCLE INCLUDES ORIGIN"

thmax = 2 Pi; c = 3.; lam = 5.; ri = -9.; ri= -lam - Sqrt[lam^2 - c^2]

eq = {R'[th] == R[th]/Tan[SI[th]], SI'[th] == (R[th]^2 - c^2)/(2 lam R[th] Sin[SI[th]]), SI[0] ==-Pi/2., R[0] == ri};

NDSolve[eq, {SI, R}, {th, 0, thmax}]; {r[u_], si[u_]} = {R[u], SI[u]} /. First[%]; g1IN = ParametricPlot[{r[th] Cos[th], r[th] Sin[th]}, {th, 0, thmax}, PlotStyle -> {Magenta, Thick}, GridLines -> Automatic]

pl1 = Plot[{r'[th], si[th]}, {th, 0, thmax}, PlotStyle -> {Green, Thick}, GridLines -> Automatic];

Plot[(r[th]^2 + r'[th]^2)^1.5/(r[th]^2 + 2 r'[th]^2 - r[th] r''[th]), {th, 0, thmax/6}, PlotStyle -> {Blue, Thick}, GridLines -> Automatic]; si[thmax]

"CIRCLE EXCLUDES ORIGIN"

thmax = .6435; c = 4.; lam = 3; ri = lam + Sqrt[c^2 + lam^2]

eq = {R'[th] ==-R[th]/Tan[SI[th]], SI'[th] == -(R[th]^2 + c^2)/(2 lam R[th] Sin[SI[th]]),SI[0] == Pi/2., R[0] == ri};

NDSolve[eq, {SI, R}, {th, 0, thmax}];

{r[u_], si[u_]} = {R[u], SI[u]} /. First[%];

g1 = ParametricPlot[{r[th] Cos[th], r[th] Sin[th]}, {th, 0, thmax}, PlotStyle -> {Red, Thick}, GridLines -> Automatic];

g1refln = ParametricPlot[{r[th] Cos[th], -r[th] Sin[th]}, {th, 0, thmax}, PlotStyle -> {Red, Thick}, GridLines -> Automatic]; pl1 = Plot[{r'[th], si[th]}, {th, 0, thmax}, PlotStyle -> {Green, Thick}, GridLines -> Automatic];

Plot[(r[th]^2 + r'[th]^2)^1.5/(r[th]^2 + 2 r'[th]^2 - r[th] r''[th]), {th, 0, thmax/6}, PlotStyle -> {Blue, Thick}, GridLines -> Automatic]; si[thmax] ri = -lam + Sqrt[c^2 + lam^2]

eq = {R'[th] == R[th]/Tan[SI[th]], SI'[th] == -(R[th]^2 + c^2)/(2 lam R[th] Sin[SI[th]]) SI[0] == Pi/2., R[0] == ri};

NDSolve[eq, {SI, R}, {th, 0, thmax}];

{r[u_], si[u_]} = {R[u], SI[u]} /. First[%];

g2 = ParametricPlot[{r[th] Cos[th], r[th] Sin[th]}, {th, 0, thmax}, PlotStyle -> {Red, Thick}, GridLines -> Automatic];

g2refln = ParametricPlot[{r[th] Cos[th], -r[th] Sin[th]}, {th, 0, thmax}, PlotStyle -> {Red, Thick}, GridLines -> Automatic];

pl2 = Plot[{r'[th], si[th]}, {th, 0, thmax}, PlotStyle -> {Green, Thick}, GridLines -> Automatic]; Plot[(r[th]^2 + r'[th]^2)^1.5/(r[th]^2 + 2 r'[th]^2 - r[th] r''[th]), {th, 0, thmax/6}, PlotStyle -> {Blue, Thick}, GridLines -> Automatic];

si[thmax]

Show[{g1IN, g1, g2, g1refln, g2refln}, PlotRange -> All] Show[{pl1, pl2}, PlotRange -> All];

" ~~~~~ Ecc Circ Polar Coord RIGHT SIDE~~~~ "

Clear["Global`"];

"CIRCLE INCLUDES ORIGIN"

thmax = 2 Pi; c = 3.; lam = 5.; ri = -9.; ri= -lam - Sqrt[lam^2 - c^2]

eq = {R'[th] == R[th]/Tan[SI[th]], SI'[th] == (R[th]^2 - c^2)/(2 lam R[th] Sin[SI[th]]), SI[0] == -Pi/2., R[0] == ri};

NDSolve[eq, {SI, R}, {th, 0, thmax}];

{r[u_], si[u_]} = {R[u], SI[u]} /. First[%];

g1IN = ParametricPlot[{r[th] Cos[th], r[th] Sin[th]}, {th, 0, thmax}, PlotStyle -> {Magenta, Thick}, GridLines -> Automatic] pl1 = Plot[{r'[th], si[th]}, {th, 0, thmax}, PlotStyle -> {Green, Thick}, GridLines -> Automatic]; Plot[(r[th]^2 + r'[th]^2)^1.5/(r[th]^2 + 2 r'[th]^2 - r[th] r''[th]), {th, 0, thmax/6}, PlotStyle -> {Blue, Thick}, GridLines -> Automatic];

si[thmax]

"CIRCLE EXCLUDES ORIGIN"

thmax = .6435; c = 4.; lam = 3; ri = lam + Sqrt[c^2 + lam^2] eq = {R'[th] ==-R[th]/Tan[SI[th]], SI'[th] == -(R[th]^2 + c^2)/(2 lam R[th] Sin[SI[th]]), SI[0] == Pi/2., R[0] == ri};

NDSolve[eq, {SI, R}, {th, 0, thmax}]; {r[u_], si[u_]} = {R[u], SI[u]} /. First[%];

g1 = ParametricPlot[{r[th] Cos[th], r[th] Sin[th]}, {th, 0, thmax}, PlotStyle -> {Red, Thick}, GridLines -> Automatic];

g1refln = ParametricPlot[{r[th] Cos[th], -r[th] Sin[th]}, {th, 0, thmax}, PlotStyle -> {Red, Thick}, GridLines -> Automatic]; pl1 = Plot[{r'[th], si[th]}, {th, 0, thmax}, PlotStyle -> {Green, Thick}, GridLines -> Automatic];

Plot[(r[th]^2 + r'[th]^2)^1.5/(r[th]^2 + 2 r'[th]^2 - r[th] r''[th]), {th, 0, thmax/6}, PlotStyle -> {Blue, Thick}, GridLines -> Automatic];

si[thmax] ri = -lam + Sqrt[c^2 + lam^2]

eq = {R'[th] == R[th]/Tan[SI[th]], SI'[th] == -(R[th]^2 + c^2)/(2 lam R[th] Sin[SI[th]]), SI[0] == Pi/2., R[0] == ri};

NDSolve[eq, {SI, R}, {th, 0, thmax}];

{r[u_], si[u_]} = {R[u], SI[u]} /. First[%];

g2 = ParametricPlot[{r[th] Cos[th], r[th] Sin[th]}, {th, 0, thmax}, PlotStyle -> {Red, Thick}, GridLines -> Automatic];

g2refln = ParametricPlot[{r[th] Cos[th], -r[th] Sin[th]}, {th, 0, thmax}, PlotStyle -> {Red, Thick}, GridLines -> Automatic];

pl2 = Plot[{r'[th], si[th]}, {th, 0, thmax}, PlotStyle -> {Green, Thick}, GridLines -> Automatic];

Plot[(r[th]^2 + r'[th]^2)^1.5/(r[th]^2 + 2 r'[th]^2 - r[th] r''[th]), {th, 0, thmax/6}, PlotStyle -> {Blue, Thick}, GridLines -> Automatic];

si[thmax]

Show[{g1IN, g1, g2, g1refln, g2refln}, PlotRange -> All]

Show[{pl1, pl2}, PlotRange -> All];

Please help find an analytical expression for $(r,\psi)$in polar coordinates.

Hope it would be interesting due to its fundamental nature.

$\endgroup$
3
  • 5
    $\begingroup$ it will be easier to help you if you can write the ODE also in Mathematica syntax. You have been here for long time. You know the protocol by now :) $\endgroup$
    – Nasser
    Jun 18 at 9:04
  • 1
    $\begingroup$ Please post the code as usual form. $\endgroup$
    – cvgmt
    Jun 20 at 14:38
  • $\begingroup$ @Nasser: code written okay now? $\endgroup$
    – Narasimham
    Jun 23 at 7:45

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.