Answer :

To find the value of [tex]\(\left(x - \frac{1}{x}\right)^2\)[/tex], given that [tex]\(x^2 + \frac{1}{x^2} = 7\)[/tex] and [tex]\(x > 0\)[/tex], we can follow these steps:

1. Expression Expansion:
We start by expanding the given expression [tex]\(\left(x - \frac{1}{x}\right)^2\)[/tex]:
[tex]\[ \left(x - \frac{1}{x}\right)^2 = x^2 - 2\cdot x \cdot \frac{1}{x} + \left(\frac{1}{x}\right)^2 \][/tex]

2. Simplify the Expression:
Simplifying the right-hand side of the expanded expression:
[tex]\[ x^2 - 2 \cdot 1 + \frac{1}{x^2} = x^2 - 2 + \frac{1}{x^2} \][/tex]

3. Using the Given Information:
We know from the problem statement that [tex]\(x^2 + \frac{1}{x^2} = 7\)[/tex]. We can substitute this result into our expression:
[tex]\[ x^2 - 2 + \frac{1}{x^2} = 7 - 2 \][/tex]

4. Calculate the Result:
Subtracting 2 from 7 gives us:
[tex]\[ 7 - 2 = 5 \][/tex]

Therefore, the value of [tex]\(\left(x - \frac{1}{x}\right)^2\)[/tex] is [tex]\(\boxed{5}\)[/tex].