As we know,
General term in the expansion of \((x+y)^{n}\) is given by,
\(T _{( r +1)}={ }^{ n } C _{ r } \times x ^{ n - r } \times y ^{ r }\)
The middle term is the expansion of \((x+y)^{n}\) depends upon the value of \(n\).
If \(n\) is even, then total number of terms in the expansion of \((x+y)^{n}\) is \(n+1\).
So there is only one middle term i.e., \(\left(\frac{n}{2}+1\right)\)th term.
If \(n\) is odd, then total number of terms in the expansion of \(( x + y )^{ n }\) is \(n +1\).
So there are two middle terms i.e., \(\left(\frac{ n +1}{2}\right)^{\text {th }}\) and \(\left(\frac{ n +3}{2}\right)^{\text {th }}\).
Here \(n=5\) ( \(n\) is odd number)
\(\therefore\) Middle term \(=\left(\frac{ n +1}{2}\right)^{\text {th }}\) and \(\left(\frac{ n +3}{2}\right)^{\text {th }}=3^{\text {rd }}\) and \(4^{\text {th }}\)
\(\therefore T _{3}= T _{(2+1)}={ }^{5} C _{2} \times(2 x )^{(5-2)} \times\left(\frac{1}{ x }\right)^{2}\) and \(T _{4}= T _{(3+1)}={ }^{5} C _{3} \times(2 x )^{(5-3)} \times\left(\frac{1}{ x }\right)^{3}\)
\(\Rightarrow T _{3}={ }^{5} C _{2} \times\left(2^{3} x \right)\) and \(T _{4}={ }^{5} C _{3} \times 2^{2} \times \frac{1}{ x }\)
\(\Rightarrow T _{3}=80 x\) and \(T _{4}=\frac{40}{ x }\)
So, the middle terms in the expansion of \(\left(2 x +\frac{1}{ x }\right)^{5}\) are \(80 x\) and \(\frac{40}{x}\).