最大值多重三角方程

时间:2014-10-22 13:07:59

标签: matlab octave trigonometry maxima nonlinear-functions

我正在尝试使用 maxima 13.04.2 来解决方程,但答案并非我所期望的。 例如:

y2=A2*cos(2*pi*f2*t+phase2)  we know A2=.4,f2=6.4951,t=1, trying to find **phase2** 
y2=.4*cos(2*pi*6.4951+phase2)

我试图在最大值中求解第二阶段的 y2等式,但它摆脱了cos函数

kill(all);
A:A; phase:phase; solve(A*cos(2*pi*f*t+phase)=0,phase);

回来的答案是

strange answer

我认为这样的事情应该回来了

y2 = A2×cos(2πf2t + φ2) ⇒

y2/A2 = cos(2πf2t + φ2) ⇒

arccos(y2/A2) = 2πf2t + φ2 ⇒

arccos(y2/A2) - 2πf2t = φ2

所以我可以插入vales A2 = 0.4,f2 = 6.4951,t = 1并获得阶段

如何获得maxima以获得正确的格式? PS:是的,我知道我可以手工完成,但我有数以千计的这样的方程式,我打算使用八度数组来调用最大值来解决它们并将答案带回八度。

1 个答案:

答案 0 :(得分:1)

嗯,这似乎很简单。

(%i1) e:A*cos(2*%pi*f*t + phi) = y;
(%o1)                     cos(2 %pi f t + phi) A = y
(%i2) solve (e, phi);
solve: using arc-trig functions to get a solution.
Some solutions will be lost.
                                      y
(%o2)                     [phi = acos(-) - 2 %pi f t]
                                      A
(%i3) subst ([A = 0.4, f = 6.4951, t = 1], %o2);
(%o3)                  [phi = acos(2.5 y) - 12.9902 %pi]

几个笔记。 (1)solve可以解决这个方程式,这是好的,但要记住它的能力相当有限,你可能可以构成其它无法解决的方程式。在Maxima中有一些其他选项可用于求解方程式,但它通常是一个弱区域。 (2)也许不是在Maxima和Octave之间来回切换,你可以在Octave中编码方程%o2并对参数的不同值进行评估。

相关问题