Find exmaple for an integrable function $ g $ in a segment $ [a,b] $ such that $ G\left(x\right)=\intop_{a}^{x}g\left(t\right)dt $ is differntiable function, but $ G'\neq g $.
For this I have 2 ideas. I'd like to hear if my ideas is correct.
The first one:
let $ g $ be the constant function $ g=0 $ over the segment $ [0,1] $.
Then $ g $ is integrable, and because $ g $ is continious we know that
$ G\left(x\right)=\intop_{a}^{x}g\left(t\right)dt $ is differentiable and $ G'(x)=g(x) $ for any x in the segment.
Now change $ g $ in some inner point in $ [a,b] $, and name the new function $ h $. then for any $ x $ the integral $ \intop_{a}^{x}g\left(t\right)dt $ hasent change, so $ G\left(x\right)=\intop_{a}^{x}g\left(t\right)dt=\intop_{a}^{x}h\left(t\right)dt $
Thus, $ G $ is still differntiable, and $ G'=g\neq h $.
Is this example correct?
Here's another one:
Consider $ g\left(x\right) $ = Thomae function over the segment $ [0,1] $. Then $ g $ is integrable, and $ G\left(x\right)=\intop_{a}^{x}g\left(t\right)dt=0 $ for any $ x $ in the segment. Thus, $ G $ is differntiable and $ G'(x)=0 $ but ofcourse Thomae function isnt the zero function.
I'd like to hear some of your opinions. Thanks in advance.