How to find the explicit form of a function which repeats the symmetric part of $10x^2-5x+2$? I have this function
$$f(x)=10x^2-5x+2, \qquad (1)$$
I plot it on the domain $(0,2)$ and this is the result

As can be seen, the function is symmetric over the domain $(0,0.5)$.
I need to know the form of the function which repeats this symmetric part over the domain like this


How can I use $(1)$ to find the explicit form of a function which gives the above plot?

Thanks in advance for any comments.
 A: The function is:
$$f(g(x)) = 10(|x| \text{ mod } {0.5})^2 - 5(|x| \text{ mod } {0.5})^2 + 2$$
where $g(x) = |x| \text{ mod } {0.5}$.
The function $h(x) = 10|x|^2 - 5|x| + 2$ is an even function which reflects the $x ≥ 0$ part of the function across the $y$-axis, as $h(-x) = h(x)$. Adding the modulo $0.5$, the function is reflected across $x = 0.5k, k \in \mathbb Z$ which repeats the function every $0.5$ units. This works for any real number, not just $0.5$.
A: Note that your quadratic is $$f(x) = 10\left(x-\frac{1}{4}\right)^2+\frac{11}{8}$$
We just want to shift this function over to the right by half a unit every half unit interval, so the function
$$g(x)=10\left(x-\frac{2k+1}{4}\right)^2+\frac{11}{8}$$ if $x\in\left[\frac{k}{2},\frac{k+1}{2}\right)$ for some non-negative integer $k$ does the trick.
A: You may describe the wanted periodic function through its Fourier Series. On the wiki page towards the bottom, there is a table of common Fourier transforms and in particular for the $P$-periodic function $\frac{4A}{P^2}(x-\frac{P}2)^2$, $0\leq x\leq P$.
All you have to do is to add the missing constant $f(P/2)$ to the series.
With $P=0.5$, $A=10/16$ and $f(P/2)=11/8$ you wind up with the cosine series
$$ f(x) =  \frac{38}{24} + \sum_{n\geq 1} \frac{5}{2\pi^2 n^2} \cos(4\pi n x)$$
