To find the period of the function [tex]\( y = \frac{1}{2} \sin (\pi x) + 3 \)[/tex], we need to determine the period of the sine function being used.
The general form of a sine function is given by:
[tex]\[ y = A \sin(Bx + C) + D \][/tex]
where:
- [tex]\( A \)[/tex] is the amplitude,
- [tex]\( B \)[/tex] affects the period,
- [tex]\( C \)[/tex] is the phase shift,
- [tex]\( D \)[/tex] is the vertical shift.
The period [tex]\( T \)[/tex] of the sine function [tex]\( y = \sin(Bx + C) \)[/tex] is calculated using the formula:
[tex]\[ T = \frac{2\pi}{B} \][/tex]
In the given function [tex]\( y = \frac{1}{2} \sin (\pi x) + 3 \)[/tex]:
- [tex]\( A \)[/tex] is [tex]\( \frac{1}{2} \)[/tex],
- [tex]\( B \)[/tex] is [tex]\( \pi \)[/tex],
- [tex]\( C \)[/tex] is [tex]\( 0 \)[/tex],
- [tex]\( D \)[/tex] is [tex]\( 3 \)[/tex].
We only need the value of [tex]\( B \)[/tex] to find the period. Substituting [tex]\( B = \pi \)[/tex] into the period formula:
[tex]\[ T = \frac{2\pi}{\pi} \][/tex]
Simplify this expression:
[tex]\[ T = 2 \][/tex]
Thus, the period of the graph of [tex]\( y = \frac{1}{2} \sin (\pi x) + 3 \)[/tex] is [tex]\( 2 \)[/tex].
Therefore, the correct answer is:
B. 2