Recurrent definition of sine function

1.4k Views Asked by At

I've recently stuck a maths problem in my head, but I cannot seem to come up with a solution. I was wondering if the series of sines $\left(\sin(1), \sin(2), \sin(3), ...\right)$ can be written as a recurrent formula, so that $\sin(n) = f\left(\sin(n-1), \sin(n-2), ...\right)$. In other words, can the element $\sin(n)$ of the sequence be written as a function of its recent history (thus, without knowing $n$)? You can easily show by counterexample that you will need at least two historical points, but so far I have been unable to come up with a formula (there is some $\cos(n)$ term that cannot seem to get rid off).

Can someone help me out? Thanks!

3

There are 3 best solutions below

2
On BEST ANSWER

Write

$$\begin{cases}\sin(n-1)=\sin n\cos1-\cos n\sin1,\\ \sin(n-2)=\sin n\cos2-\cos n\sin2\end{cases}$$ and eliminate $\cos n$.

You get

$$\sin n=\frac{\sin2\sin(n-1)-\sin1\sin(n-2)}{\sin2\cos1-\cos2\sin1}=\frac{\sin2}{\sin1}\sin(n-1)-\sin(n-2).$$

0
On

$\sin(nx)=2\cos x \sin((n-1)x)-\sin((n-2)x)$

0
On

A different approach to a recursive definition for sine function is as follows.

Consider formula $\sin(x)=2\sin(\tfrac{x}{2})\cos(\tfrac{x}{2})$ that can be written, for $x \in [0,\pi]$:

$$\tag{1}\sin(x)=2\sin(\tfrac{x}{2})\sqrt{1-\sin(\tfrac{x}{2})}.$$

This recursive definition of $\sin(x)$ will be effective if we know how to stop the successive halvings, in order to prevent an "infinite descent"...

This stopping can be done when $x$ is small enough i.e., when we can assume that the classical "small angles" approximation $sin(x) \approx x$ is accurate enough for our purpose.

Here is a Matlab program that implements this idea, with a test call for a particular value :

function test
a=pi/6;y=s(a)
%%%
function y=s(x);
if x>1.e-4
   u=s(x/2);
   y=2*u*sqrt(1-u^2);
else
   y=x;
end; 

Analysis : 15 recursive calls for this computation ; elapsed time around one millisecond compared to around $0.1$ ms for a call to $\sin(\tfrac{\pi}{6})$. Threshold $10^{-4}$ has been rather arbitrarily chosen.