Can this graph be converted to some function like $f(x)=x^2+2$ ? Not a sequence of
equations like $f(x)=\{-1<x<0:2, 0<x<1:-x+2, 1<x<2:x, 2<x<3:2\}$?
BTW: I am trying to find the Fourier Transform of this function. So that once I have the function I can use the formula to get the Fourier Transform of function.
Thank you!

I can recognise this function as the minimum of $|x - 1| + 1$ (the dip in the middle) and the constant function $2$, so $$f(x) = \min\{|x - 1| + 1, 2\}.$$ If the minimum function is objectionable, then we can always write minima in terms of absolute values. Recall that $$\min\{a, b\} = \frac{a + b - |a - b|}{2},$$ hence $$f(x) = \frac{|x - 1| + 3 - ||x - 1| - 1|}{2}.$$ Ah, but absolute values are themselves defined piecewise. We can get around this using the fact that $\sqrt{x^2} = |x|$, giving us $$f(x) = \frac{\sqrt{(x - 1)^2} + 3 - \sqrt{(\sqrt{(x - 1)^2} - 1)^2}}{2}.$$ And yet, despite my efforts to simplify the expression, we've somehow arrived at an expression that is much, much worse to integrate.
Instead, to compute the Fourier transform, simply split the integral up into four parts. We have \begin{align*} \hat{f}(\xi) &= \int_{-1}^3 f(x) e^{-2\pi i x \xi}\, \mathrm{d}x \\ &= \int_{-1}^0 f(x) e^{-2\pi i x \xi}\, \mathrm{d}x + \int_{0}^1 f(x) e^{-2\pi i x \xi}\, \mathrm{d}x + \int_1^2 f(x) e^{-2\pi i x \xi}\, \mathrm{d}x + \int_2^3 f(x) e^{-2\pi i x \xi}\, \mathrm{d}x \\ &= \int_{-1}^0 2e^{-2\pi i x \xi}\, \mathrm{d}x + \int_{0}^1 (2 - x)e^{-2\pi i x \xi}\, \mathrm{d}x + \int_1^2 xe^{-2\pi i x \xi}\, \mathrm{d}x + \int_2^3 2 e^{-2\pi i x \xi}\, \mathrm{d}x, \end{align*} all of which are easily computable directly or with one application of integration by parts. Compare this with simplifying the integral $$\hat{f}(\xi) = \int_{-1}^3 \frac{\sqrt{(x - 1)^2} + 3 - \sqrt{(\sqrt{(x - 1)^2} - 1)^2}}{2} e^{-2\pi i x \xi}\, \mathrm{d}x.$$ Take your pick.