The graph of the function you wrote, `g( x ) = 2 + 2x ,` is a straight line. Between `x = 0 ` and `x = 2` it is a straight line segment from `( 0 , 2 )` to `( 2 , 6 ) .` Its length is clearly `sqrt ( 2^2 + 4^2 ) = sqrt ( 20 ) = 2 sqrt ( 5 ) .`

It is too simple, so I suppose your `f ( x ) = 2 + 2^x .` Here we need to use the formula `L = int_a^b sqrt ( 1 + ( f ' ( x ) )^2 ) dx ` for `a = 0 , ` `b = 2 .`

We see `f ' ( x ) = 2^x * ln 2 ,` so the integral is `L = int_0^2 sqrt ( 1 + 4^x * ln^2 2 ) dx .`

It is not so simple but possible to compute in exact form. Substitute `u = 4^x ln^2 2,` then `du = 4^x ln^2 2 ln 4 dx = 2 ln 2 u dx ,` `u` is changing from `ln^2 2` to `16 ln^2 2.` The integral becomes

`int_(ln^2 2)^(16 ln^2 2) sqrt( 1 + u ) / ( 2 ln 2 u ) du .`

It is more or less a table integral, which is equal to

`(1/(2ln2) (2sqrt(u+1) + ln(sqrt(u+1)+1) - ln(sqrt(u+1) - 1))_(u=ln^2 2)^(16 ln^2 2).`

The approximate value of this nasty expression is **3.66**.