Suppose 2 J of work is needed to stretch a spring from its natural length of 30 cm to a length of 42 cm.Then how much work is needed to stretch it from 30 cm to 40 cm.

$\begin{array}{1 1}\large\frac{1}{18}\\\large\frac{1}{28}\\18\\28\end{array}$

Answer : $\large\frac{1}{18}$
From Hooke's law : $F=kx$ where $x$ is the distance the spring is stretched from its natural length,and $k$ is the (usually unknown) spring constant.
The spring's natural length is 30 cm,so it is stretched 12 cm from the natural length,we can use
$W=\int dW=\int F dx$
$2J=\int_0^{.12m}kx dx$
$\quad\;=\large\frac{k}{2}$$x^2\bigg|_0^{.12m} \quad\;=\large\frac{k}{2}$$(0.0144m^2)$
$k=\large\frac{4Nm}{0.0144m^2}$
$\;\;\;=\large\frac{100}{9}$N/m
Once we have k,we can calculate the work done as follows
$W=\int dW$
$\;\;\;\;=\int\limits_0^{.1}F dx$
$\;\;\;\;=\int\limits_0^{.1} \large\frac{100}{9}$$xdx \;\;\;\;=\large\frac{50}{9}$$x^2\bigg|_0^{.1}$
$\;\;\;\;=\large\frac{1}{18}$
edited Sep 2, 2014