# Proving that 2 functions are equal/not equal

Prove the equality of $f_1$ and $f_2$ given the following conditions:

Problem 1
$f_1(x)$ and $f_2(x)$ are functions of finitely summed sine and cosine functions (e.g. $3\cos2x+\sin5x$), any $x\in[-0.00000001,0.00000001]$ satisfies the following condition in the domain $[-0.00000001,0.00000001]$
$f_1(x)=f_2(x)$

Attempt at solution
I tried putting $f_1(x)=\sum_{k=1}^{n_1}a_k\sin(b_kx)+\sum_{k=1}^{n_1}c_k\cos(d_kx)$, $f_2(x)=\sum_{k=1}^{n_2}e_k\sin(f_kx)+\sum_{k=1}^{n_2}g_k\cos(h_kx)$, and then I tried differentiating it but I'm not quite sure how I could go on to prove that $f_1$ and $f_2$ are equal.

Problem 2
$f_1(x)$ and $f_2(x)$ are infinitely differentiable functions, any $x\in[-0.00000001,0.00000001]$ satisfies the following condition in the domain $[-0.00000001,0.00000001]$
$f_1(x)=f_2(x)$

Attempt at Solution
I tried using the Taylor expansion to prove this but apparently there are some functions which are infinitely differentiable but not expressible in Taylor series.

• How about trying Taylor series with error term.By the way what do you mean by two functions are equal?. – d80d2729a352b1366139fc119d3345 Dec 10 '13 at 11:17
• @boywholived I think it means that given any $x$, $f_1(x)=f_2(x)$ – TheOnly92 Dec 10 '13 at 11:22
• In that case, I believe Taylor series is of no use as you start with a condition that holds for a certain interval and you can't really tell how it is going to behave in the whole real numbers. – d80d2729a352b1366139fc119d3345 Dec 10 '13 at 11:25

For problem 1, $f_1 - f_2$ is a finite sum of sines and cosines, so if it is not zero it has only finitely many roots.
The second statement is false I think. What if $f_1(x) = 0$ for all $x$, $f_2(x) = 0$ for $x \leq 0.00000001$ and $f_2(x) = \exp(1/(x-0.0000001))$ for $x > 0.0000001$ ?
• So does it mean that given the condition, $f_1(x)=f_2(x)$ for any given $x$ is not true? – TheOnly92 Dec 10 '13 at 11:25
• It is true. $f_1 - f_2$ has infinitely many roots, so it must be the zero function. – Arthur Dec 10 '13 at 11:26
• @Arthur. Not really. Consider $f_1(x)=1$ when $x>0$ and $0$ otherwise and $f_2(x)=1$ when $x>0$ and $2$ otherwise. It satisfies your argument $f_1-f_2$ has infinitely many roots but not the equal as meant by O.P. – d80d2729a352b1366139fc119d3345 Dec 10 '13 at 11:29
• @boywholived $f_1$ and $f_2$ are finite sum of sines and cosines so I believe that such functions can't be considered? I'm sorry if the question is not clear enough. – TheOnly92 Dec 10 '13 at 11:31
• No he never used any specific property of $\sin$ and $\cos$ but just claimed they are functions and arrived at an answer, so I gave a counter example to such a claim. – d80d2729a352b1366139fc119d3345 Dec 10 '13 at 11:34