To simplify the expression \(\frac{(a+b)^2 + (a-b)^2}{a^2 + b^2}\), let's first simplify the numerator.
Expand \((a+b)^2\) and \((a-b)^2\):
\[ (a + b)^2 = a^2 + 2ab + b^2 \] \[ (a - b)^2 = a^2 - 2ab + b^2 \]
Add the expanded forms:
\[ (a+b)^2 + (a-b)^2 = (a^2 + 2ab + b^2) + (a^2 - 2ab + b^2) \] \[ = a^2 + 2ab + b^2 + a^2 - 2ab + b^2 \] \[ = 2a^2 + 2b^2 \]
Now, we can simplify the entire expression:
\[ \frac{(a+b)^2 + (a-b)^2}{a^2 + b^2} = \frac{2a^2 + 2b^2}{a^2 + b^2} \]
Factor out the 2 in the numerator:
\[ = \frac{2(a^2 + b^2)}{a^2 + b^2} \]
Since \(a^2 + b^2\) is not zero (assuming \(a\) and \(b\) are not both zero), we can cancel out \(a^2 + b^2\):
\[ = 2 \]
Thus, the simplified expression is:
\[ \frac{(a+b)^2 + (a-b)^2}{a^2 + b^2} = 2 \]