Find the Fourier sine series for

[tex]\[ f(x) = \begin{cases}
0 & \text{if } x \leq 2 \\
2 & \text{if } x \ \textgreater \ 2
\end{cases} \][/tex]

on [tex]\((0,3)\)[/tex].



Answer :

Let's find the Fourier sine series for the piecewise function [tex]\( f(x) \)[/tex] defined as follows on the interval [tex]\( (0, 3) \)[/tex]:
[tex]\[ f(x) = \begin{cases} 0 & \text{if } x \leq 2 \\ 2 & \text{if } x > 2 \end{cases} \][/tex]

### Step 1: Define the Fourier Sine Series

The Fourier sine series represents a function [tex]\( f(x) \)[/tex] in terms of sine functions and is given by:
[tex]\[ f(x) \sim \sum_{n=1}^{\infty} b_n \sin\left(\frac{n \pi x}{L}\right) \][/tex]

Here, [tex]\( L = 3 \)[/tex] is half of the period for the function defined on the interval [tex]\( (0, 3) \)[/tex].

### Step 2: Compute the Coefficients [tex]\( b_n \)[/tex]

The coefficients [tex]\( b_n \)[/tex] are determined by the integral:
[tex]\[ b_n = \frac{2}{L} \int_{0}^{L} f(x) \sin\left(\frac{n \pi x}{L}\right) \, dx \][/tex]
Substituting [tex]\( L = 3 \)[/tex], we get:
[tex]\[ b_n = \frac{2}{3} \int_{0}^{3} f(x) \sin\left(\frac{n \pi x}{3}\right) \, dx \][/tex]

### Step 3: Perform the Integration

Since [tex]\( f(x) \)[/tex] is piecewise defined, we need to break the integral into two parts:
[tex]\[ b_n = \frac{2}{3} \left( \int_{0}^{2} 0 \cdot \sin\left(\frac{n \pi x}{3}\right) \, dx + \int_{2}^{3} 2 \cdot \sin\left(\frac{n \pi x}{3}\right) \, dx \right) \][/tex]

The first integral is zero because the integrand is zero:
[tex]\[ \int_{0}^{2} 0 \cdot \sin\left(\frac{n \pi x}{3}\right) \, dx = 0 \][/tex]

So we need to compute:
[tex]\[ b_n = \frac{2}{3} \int_{2}^{3} 2 \sin\left(\frac{n \pi x}{3}\right) \, dx \][/tex]
[tex]\[ b_n = \frac{4}{3} \int_{2}^{3} \sin\left(\frac{n \pi x}{3}\right) \, dx \][/tex]

### Step 4: Integrate the Sine Function

To solve the integral:
[tex]\[ \int_{2}^{3} \sin\left(\frac{n \pi x}{3}\right) \, dx \][/tex]
Let's use the antiderivative of the sine function:
[tex]\[ \int \sin(ax) \, dx = -\frac{1}{a}\cos(ax) \][/tex]
Here, [tex]\( a = \frac{n \pi}{3} \)[/tex], so:
[tex]\[ \int \sin\left(\frac{n \pi x}{3}\right) \, dx = -\frac{3}{n \pi} \cos\left(\frac{n \pi x}{3}\right) \][/tex]

Evaluating this from 2 to 3:
[tex]\[ \left[ -\frac{3}{n \pi} \cos\left(\frac{n \pi x}{3}\right) \right]_{2}^{3} \][/tex]
[tex]\[ = -\frac{3}{n \pi} \left( \cos\left(\frac{n \pi \cdot 3}{3}\right) - \cos\left(\frac{n \pi \cdot 2}{3}\right) \right) \][/tex]
[tex]\[ = -\frac{3}{n \pi} \left( \cos(n \pi) - \cos\left(\frac{2 n \pi}{3}\right) \right) \][/tex]
[tex]\[ = -\frac{3}{n \pi} \left( (-1)^n - \cos\left(\frac{2 n \pi}{3}\right) \right) \][/tex]

### Step 5: Substitute Back into [tex]\( b_n \)[/tex]

Substituting this result back into [tex]\( b_n \)[/tex]:
[tex]\[ b_n = \frac{4}{3} \cdot \left( -\frac{3}{n \pi} \right) \left( (-1)^n - \cos\left(\frac{2 n \pi}{3}\right) \right) \][/tex]
[tex]\[ b_n = \frac{4}{n \pi} \left( (-1)^n - \cos\left(\frac{2 n \pi}{3}\right) \right) \][/tex]

### Step 6: Simplify the Coefficient Expression

This gives us the Fourier sine series coefficient:
[tex]\[ b_n = \frac{4}{n \pi} \left( (-1)^n - \cos\left(\frac{2 n \pi}{3}\right) \right) \][/tex]

### Step 7: Construct the Fourier Sine Series

We now construct the Fourier sine series using the coefficients [tex]\( b_n \)[/tex]:
[tex]\[ f(x) \sim \sum_{n=1}^{\infty} \left( \frac{4}{n \pi} \left( (-1)^n - \cos\left(\frac{2 n \pi}{3}\right) \right) \right) \sin\left(\frac{n \pi x}{3}\right) \][/tex]

For a specific number of terms (e.g., the first 10 terms), the series is:
[tex]\[ f(x) \approx \sum_{n=1}^{10} \left( \frac{4}{n \pi} \left( (-1)^n - \cos\left(\frac{2 n \pi}{3}\right) \right) \right) \sin\left(\frac{n \pi x}{3}\right) \][/tex]

### Final Answer

The Fourier sine series for [tex]\( f(x) = \begin{cases} 0 & \text{if } x \leq 2 \\ 2 & \text{if } x > 2 \end{cases} \)[/tex] on [tex]\( (0, 3) \)[/tex] up to the first 10 terms is:

[tex]\[ f(x) \approx 2.0 \frac{\sin\left(\frac{\pi x}{3}\right)}{\pi} - 3.0 \frac{\sin\left(\frac{2 \pi x}{3}\right)}{\pi} + 2.6667 \frac{\sin\left(\pi x\right)}{\pi} - 1.5 \frac{\sin\left(\frac{4 \pi x}{3}\right)}{\pi} + 0.4 \frac{\sin\left(\frac{5 \pi x}{3}\right)}{\pi} + 0.2857 \frac{\sin\left(\frac{7 \pi x}{3}\right)}{\pi} - 0.75 \frac{\sin\left(\frac{8 \pi x}{3}\right)}{\pi} + 0.8889 \frac{\sin\left(\frac{3 \pi x}{3}\right)}{\pi} - 0.6 \frac{\sin\left(\frac{10 \pi x}{3}\right)}{\pi} \][/tex]

This is the Fourier sine series approximation for the given function [tex]\( f(x) \)[/tex].