To check continuity and differentiability Consider the function
I am having problem with checking continuity because of y. Regarding differentiability i can apply Leibniz rule to get explicit formula.But then modulus part troubles me. Can somebody show me way to do this? Thanks
 A: $$\int_0^x \{5 + |1-y|\} dy = \int_0^1 \{5 + 1-y \} dy + \int_1^x \{5 + y-1 \} dy $$
$$=\int_0^1 \{6-y \} dy + \int_1^x \{4+y\} dy$$
$$=6-\frac{1}{2}+4(x-1)+\frac{x^2}{2}-\frac{1}{2}$$
$$=\frac{x^2}{2}+4x+1$$
So $$f(x)=\begin{cases}\frac{x^2}{2}+4x+1 & x > 2 \\ 5x+2 & x \le 2\end{cases}$$
Does this help?
A: OK, In fact, you should evaluate the integral first and it it will be easy to investigate the continuity and differentiability. So I just compute the integral for you
$$\begin{align}
I &= \int_{0}^{x}(5+|1-y|) dy \\
&=  \int_{0}^{1}(5+|1-y|) dy + \int_{1}^{x}(5+|1-y|) dy & \text{This is true for all real numbers $x$}  \\
&= \int_{0}^{1}(6-y) dy + \int_{1}^{x}(4+y) dy & \text{Note that $x \gt 2$ and hence $|1-y|=-(1-y)$} \\
&= \left( 6y- \frac{y^2}{2}\right)_{0}^{1} +\left( 4y+ \frac{y^2}{2}\right)_{1}^{x} \\
&= \left(\frac{11}{2}-0\right) + \left(4x + \frac{x^2}{2} - \frac{9}{2}\right) \\
&= \frac{x^2}{2} + 4x +1
\end{align}$$
A: Definitely $f $ is not continuous at $x=2$:
$f(2+h)=\lim_{h\to 0}\int _0^{2+h}5+|1-y|\operatorname{dy}=\lim_{h\to 0}\int _0^25+|1-y|\operatorname{dy}=10 $ which is true both for $y<1$ or $y>1$.
Obviously $f(2-h)=12$
A: $$f(x)=\int_0^x(5+|1-y|)dy \ \ \ \ \ \ \ \ \ \ \ \  if \ x>2$$
Differentiating w.r.t. "x" we get
$$f'(X)=\frac{d}{dx}\int_0^x(5+|1-y|)dy$$
$$f'(X)=5+|1-x|$$
As $x>2$ then $x-1>1$
$$f'(X)=5+(x-1)$$
$$f'(X)=4+x$$
Integrating w.r.t. "x"
$$f(x)=4x+\frac{x^2}{2}+c$$
By the definition of continuity we can find the value of $c=2$ so that
$$f(x)=4x+\frac{x^2}{2}+2 \ \ \ \ \ \ \ if \ x>2$$
