0

I want to find equation of scaled ( smaller) ellipse inscribed in another ellipse with 2 common points

I have system of 2 trigonometric equations ( eq1 and eq2) and 2 variables:

  • s ( it is a scaling factor of second ellipse) s = a'/a
  • t ( it is a parameter of ellipse )

kill(all);
remvalue(all);
ratprint:false;
numer:true$


GivePointOfEllipse(a,b, t):= a*cos(t) + b*sin(t)*%i$


/* trigonometric functions in Maxima CAS use radians */
deg2rad(t):= float(t*2*%pi/360)$


theta :deg2rad(30) $  /* theta is the angle between    */
a:3$
b:2$


z1: GivePointOfEllipse(a, b, t)$



/* */
x1:realpart(z1)$
y1:imagpart(z1)$

/* system of 2 trigonometric equations */
eq1: x1 = s*a*cos(t)*cos(theta) - s*b*sin(t) * sin(theta)$
eq2: y1 = s*a*cos(t)*sin(theta) + s*b*sin(t) * cos(theta)$

I can solve it using solve:

 solvetrigwarn: false$
sol:solve([eq1,eq2],[s,t])$

but it gives no result ( empty list). So I use solver:


load(Solver)$
ss:Solver([eq1,eq2],[s,t])$

It gives some result, the relation between s and t:

ss;

(%o37) [[s = -(42978006*cos(t))/(14326002*sin(t)-37220045*cos(t)),
         [(28652004*sin(t)^2+64467009*cos(t)^2)
           /(14326002*sin(t)-37220045*cos(t))]]]

so I check it :


fs(t):=  42978006*cos(t)/( 14326002*sin(t) -37220045*cos(t));
 plot2d (fs(t), [t, 0, 2*%pi])$
 
fs2(t):=(28652004 *(sin (t))^2 + 64467009*(cos(t))^2)/ (14326002*sin(t)-37220045* cos(t))$
  plot2d (fs2(t), [t, 0, 2*%pi])$

but the result is not good: enter image description here

I think that s should be a positive number smaller then 1. For example

  • for theta = 30 degrees s = 0.8117
  • for theta = 5 degrees s = 0.942

Value of parameter t is not important here.

How can I do it ? TIA

Adam
  • 1,254
  • 12
  • 25
  • 1
    I don't know if Maxima can find a symbolic solution for those equations. My advice at this point is to try for a numerical approximation. You can try `mnewton`; I think there is also a package derived from Fortran for solving equations, although I forget what it is named. Try looking in maxima/share. Sorry I can't be more helpful. – Robert Dodier Dec 15 '20 at 19:44
  • @Robert Dodier Thx. I'm lazy so I took formula from the other question. The result : https://commons.wikimedia.org/wiki/File:Nested_Ellipses.png – Adam Dec 16 '20 at 16:15

0 Answers0