A box with weight $W$ will slide down a $30^\circ$ incline at constant speed under the influence of gravity and friction alone. If instead a horizontal force $P$ is applied to the box, the box can be made to move up the ramp at constant speed. What is the magnitude of $P$?

$\textbf{(A) } P = W/2 \\
\textbf{(B) }  P = 2W/\sqrt{3}\\
\textbf{(C) } P = W\\
\textbf{(D) } P = \sqrt{3}W \\
\textbf{(E) } P = 2W$
1. **Determine the coefficient of friction ($\mu$):**
   - Since the box slides down the incline at a constant speed, the net force along the incline must be zero. This implies that the component of gravitational force down the incline is balanced by the frictional force.
   - The gravitational force component down the incline is \( W \sin 30^\circ \).
   - The normal force is \( W \cos 30^\circ \).
   - The frictional force is \( \mu \cdot \text{Normal force} = \mu W \cos 30^\circ \).
   - Since the box slides at constant speed, \( W \sin 30^\circ = \mu W \cos 30^\circ \).
   - Solving for \(\mu\):
     \[
     \mu = \frac{W \sin 30^\circ}{W \cos 30^\circ} = \frac{\sin 30^\circ}{\cos 30^\circ} = \tan 30^\circ = \frac{1}{\sqrt{3}}
     \]

2. **Set up the forces when a horizontal force \(P\) is applied:**
   - The normal force now has two components: one from the weight and one from the horizontal force.
   - The normal force is \( W \cos 30^\circ + P \cos 60^\circ \).
   - The frictional force is \( \mu \cdot \text{Normal force} = \frac{1}{\sqrt{3}} (W \cos 30^\circ + P \cos 60^\circ) \).

3. **Balance the forces along the incline:**
   - The component of the horizontal force \(P\) along the incline is \( P \sin 60^\circ \).
   - The component of the gravitational force along the incline is \( W \sin 30^\circ \).
   - The frictional force opposes the motion up the incline.
   - The equation for constant speed up the incline is:
     \[
     P \sin 60^\circ = \frac{1}{\sqrt{3}} (W \cos 30^\circ + P \cos 60^\circ) + W \sin 30^\circ
     \]

4. **Substitute the trigonometric values:**
   - \(\sin 30^\circ = \frac{1}{2}\)
   - \(\cos 30^\circ = \frac{\sqrt{3}}{2}\)
   - \(\sin 60^\circ = \frac{\sqrt{3}}{2}\)
   - \(\cos 60^\circ = \frac{1}{2}\)

5. **Simplify the equation:**
   \[
   P \cdot \frac{\sqrt{3}}{2} = \frac{1}{\sqrt{3}} \left( W \cdot \frac{\sqrt{3}}{2} + P \cdot \frac{1}{2} \right) + W \cdot \frac{1}{2}
   \]
   \[
   P \cdot \frac{\sqrt{3}}{2} = \frac{1}{\sqrt{3}} \cdot \frac{\sqrt{3}W}{2} + \frac{P}{2\sqrt{3}} + \frac{W}{2}
   \]
   \[
   P \cdot \frac{\sqrt{3}}{2} = \frac{W}{2} + \frac{P}{2\sqrt{3}} + \frac{W}{2}
   \]
   \[
   P \cdot \frac{\sqrt{3}}{2} = W + \frac{P}{2\sqrt{3}}
   \]

6. **Solve for \(P\):**
   \[
   P \cdot \frac{\sqrt{3}}{2} - \frac{P}{2\sqrt{3}} = W
   \]
   \[
   P \left( \frac{\sqrt{3}}{2} - \frac{1}{2\sqrt{3}} \right) = W
   \]
   \[
   P \left( \frac{3 - 1}{2\sqrt{3}} \right) = W
   \]
   \[
   P \left( \frac{2}{2\sqrt{3}} \right) = W
   \]
   \[
   P \left( \frac{1}{\sqrt{3}} \right) = W
   \]
   \[
   P = W \sqrt{3}
   \]

The final answer is \(\boxed{\sqrt{3}W}\)