首页 > 解决方案 > 如何在 Maxima CAS 中求解三角方程组?

问题描述

我想找到另一个椭圆中的缩放(较小)椭圆方程,它有 2 个公共点

我有 2 个三角方程组(eq1 和 eq2)和 2 个变量:


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)$

我可以使用solve解决它:

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

但它没有给出任何结果(空列表)。所以我使用求解器:


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

它给出了一些结果,即 s 和 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))]]]

所以我检查它:


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])$

但结果并不好: 在此处输入图像描述

我认为 s 应该是一个小于 1 的正数。例如

参数 t 的值在这里并不重要。

我该怎么做 ?TIA

标签: trigonometrycurveellipsemaximaequation-solving

解决方案


推荐阅读