# Homework Help: Current on a spring to withstand a weight.

Tags:
1. Apr 6, 2015

### pitbull

1. The problem statement, all variables and given/known data
You have a spring of lenght l, radius R, with N loops and n loops per unit length. If you consider it a solenoid, what current do you need to apply to withstand a mass m hanging from it, without stretching or shrinking the spring.

2. Relevant equations
Magnetic field inside a solenoid: B0nIz
Magnetic energy: W=∫∫∫B2/(2μ0)dV

3. The attempt at a solution
I calculated the magnetic energy of a solenoid and I got:
W=μ0N2I2πR2/(2l)

The force applied by the mass is:
F=mg

So, the magnetic force that I need is:
F=∇W(length constant)=μ0N2IπR2/(l)

Both forces must be equal. I solve for I and I get:
I=mgl/(μ0N2πR2)

Do you thing it is right?

Last edited: Apr 6, 2015
2. Apr 6, 2015

### Staff: Mentor

The approach looks good, but I get confused by the notation with I, l and l.
The derivative has to be with respect to length.

3. Apr 6, 2015

### pitbull

So should I derivate with respect to length and then equal that derivative to mg?

4. Apr 6, 2015

### Staff: Mentor

Sure. You are interested in the total energy after a length change to see if this length change happens.

5. Apr 6, 2015

### pitbull

And after equaling both quantities, I solve for I (current), right?

6. Apr 6, 2015

Sure.