The graph of the function $y=|x-1|+|x+1|$ and the line $y=c$ enclose a region with an area of 30. What is the value of the constant $c$?
The graph of the function consists of three parts. Between -1 and 1, it is a horizontal segment $y=2, x$, and to the left of -1 and to the right of +1, there is a ray on each side. The line $y=c$ is parallel to the $x$-axis, and since $c>2$, it forms a symmetric trapezoid with the two lines. The graph of the function is symmetric about the $y$-axis, so it is sufficient to examine the diagram for $x \geq 1$ in the first quadrant.

![](https://cdn.mathpix.com/cropped/2024_05_02_a0bd3b9dcaffd5976f2bg-1.jpg?height=480&width=631&top_left_y=318&top_left_x=736)

Let's calculate the coordinates of the intersection point $P_{1}$ of the line $y=c$ and the function curve. Since $x \geq 1, y=2 x$, we have $c=2 x$, so $x=\frac{c}{2}$ and $y=c$. The coordinates of $P_{2}$ are $-\frac{c}{2}$ and $c$. The shorter base of the trapezoid is 2 units, the longer base is $P_{1} P_{2}=c$, and the height is $c-2$. Thus, $30=\frac{c+2}{2}(c-2)$, from which $c^{2}-4=60$ and since $c>0$, we get $c=8$.