# Show that $f(x)=g(x) +K$ and what can we deduce from $f(x+y) = f(x) + f(y)$

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$$

• These are two completely disjoint questions. Please ask one question at a time only. – user296602 Aug 3 '16 at 1:56
• Question 2 means f (x) = mx +b. – fleablood Aug 3 '16 at 1:57
• @T.Bongers He's not asking two questions actually. He gave his work onf the first one and he's asking for a hint on the second. – Daniel Aug 3 '16 at 1:58
• @SolidSnake The second question is unrelated to the first. – user296602 Aug 3 '16 at 2:01
• @T.Bongers Totally agreed, but he's not asking both questions, not directly. – Daniel Aug 3 '16 at 2:01

## 2 Answers

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$?

• the derivative does not depend on $a$ – Elina Aug 3 '16 at 1:51
• That's right, so how is this derivative? what does this imply about the function? – Daniel Aug 3 '16 at 1:54
• they all have the same slope? – Elina Aug 3 '16 at 2:02
• That's right, these are functions with constant slopes... lines, basically (as you mention in a comment above). – Daniel Aug 3 '16 at 2:04
• thx you for your help – Elina Aug 3 '16 at 2:17

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$