Draw the perpendicular to the tangent line of the ellipse $\frac{x^{2}}{a^{2}}+\frac{y^{2}}{b^{2}}=1\ (a>0,\ b>0)$ from the origin $O(0,\ 0).$

Let $\theta$ be the angle between the perpendicular and the positive direction of $x$ axis. Denote the length of the perpendicular by $r(\theta).$

Calculate $\int_{0}^{2\pi}r(\theta )^{2}\ d\theta.$
1. Given the ellipse equation:
   \[
   \frac{x^{2}}{a^{2}}+\frac{y^{2}}{b^{2}}=1 \quad (a>0,\ b>0)
   \]
   We need to find the perpendicular to the tangent line from the origin \(O(0, 0)\).

2. The slope of the tangent line at a point \((x, y)\) on the ellipse can be found using implicit differentiation:
   \[
   \frac{d}{dx}\left(\frac{x^2}{a^2} + \frac{y^2}{b^2}\right) = 0 \implies \frac{2x}{a^2} + \frac{2y}{b^2} \frac{dy}{dx} = 0 \implies \frac{dy}{dx} = -\frac{b^2 x}{a^2 y}
   \]
   At the point \((a \cos t, b \sin t)\), the slope of the tangent line is:
   \[
   \frac{dy}{dx}\Big|_{(a\cos t, b\sin t)} = -\frac{b \cos t}{a \sin t}
   \]

3. The slope of the perpendicular to the tangent line is the negative reciprocal of the tangent slope:
   \[
   \text{Slope of the perpendicular} = \frac{a \sin t}{b \cos t} = \tan \theta
   \]
   This gives us:
   \[
   \tan t = \frac{b \tan \theta}{a}
   \]

4. The equation of the perpendicular line from the origin is:
   \[
   y = \left( \frac{a \sin t}{b \cos t} \right) x
   \]

5. The equation of the tangent line at \((a \cos t, b \sin t)\) is:
   \[
   y - b \sin t = -\frac{b}{a \tan t}(x - a \cos t)
   \]

6. Solving these two equations to find the intersection point \((h, k)\):
   \[
   h = \frac{ab^{2} \sec t}{a^{2} \tan^{2} t + b^{2}}, \quad k = \frac{a^{2} b \tan t \sec t}{a^{2} \tan^{2} t + b^{2}}
   \]

7. The length of the perpendicular \(r(t)\) is given by:
   \[
   r(t)^{2} = h^{2} + k^{2} = a^{2} b^{2} \cdot \frac{\tan^{2} t + 1}{a^{2} \tan^{2} t + b^{2}}
   \]

8. Using \(\tan t = \frac{b \tan \theta}{a}\), we get:
   \[
   r(\theta)^{2} = \frac{b^{2} \tan^{2} \theta + a^{2}}{\sec^{2} \theta}
   \]

9. By symmetry, we have:
   \[
   \int_{0}^{2\pi} r(\theta)^{2} \, d\theta = 4 \int_{0}^{\frac{\pi}{2}} r(\theta)^{2} \, d\theta
   \]

10. Substituting \(r(\theta)^{2}\):
    \[
    \int_{0}^{2\pi} r(\theta)^{2} \, d\theta = 4 \int_{0}^{\frac{\pi}{2}} \frac{b^{2} (\sec^{2} \theta - 1) + a^{2}}{\tan^{2} \theta + 1} \, d\theta
    \]

11. Simplifying the integral:
    \[
    = 4 b^{2} \int_{0}^{\frac{\pi}{2}} \frac{\sec^{2} \theta}{1 + \tan^{2} \theta} \, d\theta + 2 (a^{2} - b^{2}) \int_{0}^{\frac{\pi}{2}} (1 + \cos 2\theta) \, d\theta
    \]

12. Evaluating the integrals:
    \[
    = 4 b^{2} \left( \tan^{-1} (\tan \theta) \right) \Big|_{0}^{\frac{\pi}{2}} + 2 (a^{2} - b^{2}) \left( \frac{\pi}{2} + \frac{1}{2} \sin 2\theta \Big|_{0}^{\frac{\pi}{2}} \right)
    \]

13. Simplifying further:
    \[
    = 2 b^{2} \pi + (a^{2} - b^{2}) \pi = \pi (a^{2} + b^{2})
    \]

The final answer is \( \boxed{ \pi (a^{2} + b^{2}) } \)