Question: let $f,g:[a,b]\rightarrow \mathbb R$ be two continuous function and differentiable on $(a,b)$ such that $f'(x)=g'(x)$ for all $x \in (a,b)$. 

1. Show that $f(x)=g(x)+K$ , $K$ is a constant
2. What can we deduce about all the differentiable function $f:\mathbb R\rightarrow \mathbb R$ s.t. $$f(x+y) = f(x)+f(y)\ \ \ \text{for all $x ,y \in \mathbb R$}$$

---

For question 1) 

Let $F(x) = f(x) + g(x)$, then $F(x)$ is continuous on $[a,b]$ and differentiable on $(a,b)$

Let's take the derivative of F(x) $$F'(x) = g'(x) +f'(x) = 0 \ \forall x (a,b) \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \_{(\text{because} f'(x)=g'(x)\ ) }$$

Since $F'(x) = 0 \ \ \forall x \in (a,b)$ it follow that $F(x)$ is a constant function.

Let $K=F(x) $ We conclude that $$f(x) =g(x) +K \ \ \ \forall x\in (a,b)$$

---

I'm not sure how to answer question 2.

$$f(0) = f(0+0) = f(0) +f(0) = 0$$

$$f'(x)=f(0) \ \forall x \in R $$
$$f(x) =f'(0)x + K$$
$$K=f(0)=0$$
$$f(x) = f'(0)x \ \ \ \ \ \ \ \forall x \in R$$

Answer: 
**HINT:**

How does the definition of derivative become in that case?

> 
>  $$f'(a) = \lim\_{h\to 0} \frac{f(a+h)-f(a)}{h}$$ and apply the hypothesis on $f(a+h)$. Does the derivative depend on $a$?
> 
> 
>
By the fundamental theorem of calculus:

$f(x)-f(a)=\int\limits\_{a}^xf'(t)dt$

$g(x)-g(a)=\int\limits\_{a}^xg'(t)dt=\int\limits\_{t=a}^xf'(t)dt$.

From here $f(x)-g(x)-f(a)+g(a)=0$ for all $x$.

We conclude $f(x)=g(x)+\color{red}{f(a)-g(a)}=g(x)+\color{red}K$ for all $x$