I am trying to find the constants $A$ and $B$ for the general series solution of the wave equation
$$u(x, t) = \sum_{n = 1}^\infty \left( A_n \cos(c n \pi t) + B_n \sin(c n \pi t) \right) \sin(\pi n x)$$
with initial condition $g(x) = \max \{0, 1 − |8x − 4| \}$.
I'm assuming this means $u(x, 0) = g(x) = \max \{0, 1 − |8x − 4| \}$? Would I be correct?
I know that we can use the orthogonality of $sin(n \pi x)$ to find the explicit form of the coefficients $A_n$ and $B_n$, by multiplying each equation by $sin(m \pi x)$ and integrating.
It says the solution is
$$A_n = \left( \frac{8}{\pi n} \right)^2 \left( \sin\left( \frac{n \pi}{16} \right) \right)^2 \left( \sin\left( \frac{n \pi}{2} \right) \right)$$
for odd $n$ and $A_n = 0$ for even $n$.
And apparently the second condition gives us $B_n = 0$.
However, I'm not sure how to use this initial condition.
The first thing I calculated was when $g(x) = 1 − |8x − 4|$ and when $g(x) = 0$:
$$1 - |8x - 4| > 0$$
$$\rightarrow |8x - 4| < 1$$
By my reasoning, we have two possibilities:
$$8x - 4 < 1$$ (If $8x - 4 > 0$)
$$\rightarrow 8x < 5$$
$$x < \frac{5}{8}$$
$$-(8x - 4) < 1$$ (If $8x - 4 < 0$)
$$\rightarrow 8x - 4 > -1$$
$$\rightarrow 8x > 3$$
$$x > \frac{3}{8}$$
This means that $\dfrac{5}{8} > x > \dfrac{3}{8}$ to have $1 - |8x - 4| > 0$.
I am not sure how to proceed from here?
Thank you for any help.
Break up the absolute value
$$ |8x-4| = \begin{cases} 8x-4, & \text{if} & x > \frac12 \\ -(8x-4), & \text{if}& x < \frac12 \end{cases} $$
Hence
$$ 1-|8x-4| = \begin{cases} 5-8x, & \text{if} & x > \frac12 \\ 8x-3, & \text{if}& x < \frac12 \end{cases} $$
You already deduced that the function has to be zero outside $(\frac38, \frac58)$, therefore
$$ g(x) = \begin{cases} 0, & \text{if} & 0 < x < \frac38 \\ 8x-3, & \text{if} & \frac38 < x < \frac12 \\ 5-8x, & \text{if} & \frac12 < x < \frac58 \\ 0, & \text{if} & \frac58 < x < 1 \end{cases} $$
I assume the the domain is $[0,1]$ from the Fourier series expression.
You can integrate piece-wise to find $A_n$
You need a second initial condition to determine $B_n$. Check the problem again to see what it might be. If $B_n=0$ then it's likely $u_t(x,0)=0$