1) Differentiation:
Define the signum function
$$\mathop{sgn}{(x)}=
\begin{cases}
-1 \quad \text{if } x<0 \\
+1 \quad \text{if } x>0 \\
0 \quad \text{if } x=0 \\
\end{cases}$$
Claim: $$ \frac{d |x|}{dx} = \mathop{sgn}(x), x\neq 0$$
Proof: Use the definition of the absolute value function and observe the left and right limits at $x=0$.
Hence, $$
\frac{d |x-3|}{dx} =
\begin{cases}
-1 \quad \text{if } x-3<0 \quad(x<3)\\
+1 \quad \text{if } x-3>0 \quad(x>3)
\end{cases}$$
2) Indefinite integration:
$$\int |x| \, \mathrm{d}x = \frac{x|x|}{2} + C$$
Proof:
$$
\frac{d}{dx}\left(\frac{x|x|}{2}\right)=\frac{1}{2}[ |x|+x \mathop{sgn}(x)] = \frac{1}{2}(2|x|)=|x|
$$
3)Definite integration:
Look at the interval over which you need to integrate, and if needed break the integral in two pieces - one over a negative interval, the other over the positive. For example, if $a<0, b>0$,
$$
\int_a^b |x| \, \mathrm{d}x = \int_a^0 (-x)\, \mathrm{d}x + \int_0^b x \, \mathrm{d}x = \frac{b^2+a^2}{2}.
$$