Problem #1: Consider the following function
f(x) = \sqrt{8 - x}, 0 < x < 8.
(a) Construct a half-range expansion of $f$, assuming that $f$ is extended to the interval $[-8, 0]$ as an odd function.
The definite integrals appearing in the series should be evaluated numerically using the function trapz. For
this purpose the interval $[0, 8]$ can be discretized using 200 subintervals.
On one graph, plot the function $f$ on the interval $[0, 8]$ using a red line of thickness 3, the extension of $f$ on
the interval $[-8, 0]$ using a blue line of thickness 3, and the series truncated after 1, 2, ..., 7 terms (i.e., there
should be 7 curves, each corresponding to the series with a different number of terms) on the interval $[-16,
16]$ using a black line of thickness 1.
Use your First Name, Last Name, and Student Number as the title for the graph (e.g., 'Johnny Good,
1234567'). Then save the graph as a Portable Network Graphics (.png) file, and upload it.
(b) Repeat part (a) above, but this time assume that $f$ is extended to the interval $[-8, 0]$ as an even function.
(c) Repeat part (a) above, but this time assume that $f$ is extended to the interval $[-8, 0]$ through an identity
reflection, i.e., as $f(x) = f(x + 8)$.