正餘弦函數的合成
Author: 藍邦偉  老師

正餘弦函數的合成

.

,

a

a = -2 (slider from -5 to 5, step 1)
b = 3 (slider from -5 to 5, step 1)
f(x) = a * sin(x) + b * cos(x)
g(x) = a * sin(x)
h(x) = b * cos(x)
u = Vector((x(Corner[1]), 0), (x(Corner[3]), 0))
v = Vector((0, y(Corner[1])), (0, y(Corner[3])))
c = true
d = true
e = true
text1: "$ y=" + (LaTeX[a]) + "sinx $"
text2: "$ y=" + (LaTeX[b]) + "cosx $"
text3: "$ y=" + (LaTeX[a]) + "sinx" + (LaTeX[If[b < 0, "-", "+"]]) + "" + (LaTeX[abs(b)]) + "cosx $
   $=\sqrt{" + (LaTeX[a^(2) + b^(2)]) + "}sin(x+ϕ)$"