Step-by-step explanation:
Let's denote the original fraction as \( \frac{n}{d} \), where \( n \) is the numerator and \( d \) is the denominator. According to the given condition:
1. If we add 1 to the numerator and subtract 1 from the denominator, the fraction becomes \( \frac{n + 1}{d - 1} \), and this equals 1. So, we have:
\[
\frac{n + 1}{d - 1} = 1
\]
Solving this equation gives us \( n + 1 = d - 1 \), which simplifies to \( n = d - 2 \).
2. If we add 1 to the denominator, the fraction becomes \( \frac{n}{d + 1} \), and this equals \( \frac{1}{2} \). So, we have:
\[
\frac{n}{d + 1} = \frac{1}{2}
\]
Solving this equation gives us \( 2n = d + 1 \), which simplifies to \( n = \frac{d + 1}{2} \).
Now, equating the expressions for \( n \):
\[ d - 2 = \frac{d + 1}{2} \]
Multiplying both sides by 2 to eliminate the fraction:
\[ 2(d - 2) = d + 1 \]
Expanding and solving for \( d \):
\[ 2d - 4 = d + 1 \]
\[ 2d - d = 1 + 4 \]
\[ d = 5 \]
Now, substitute \( d = 5 \) back into one of the equations to find \( n \):
\[ n = d - 2 = 5 - 2 = 3 \]
So, the fraction is \( \frac{3}{5} \).