addfrac(x+1/x)
The original denominators must be nonzero: x ≠ 0
Let's add fractions: x + 1x
ⓘ To add fractions, put them over the same denominator, then add the numerators: x + 1x = x·x + 1x
x·x + 1x
ⓘ To multiply powers with the same base, add their exponents: x·x = x2
▶Result:   x2 + 1x