Whoa there, Paul, take a deep breath
I am not 100% confident in almost anything. But that’s just me…
On the topic at hand, my first thought was “The problem doesn’t say the spring was linear.”
But, then again, my thesis was in Non-linear Vibrations, so I may just have a Jones for non-linearities…
Taking non-linear off the table, I prefer to attack these type of problems in geometric terms.
As has been pointed out, the work is the area under the force-displacement curve.
The 2 joule thing is actually the area of a triangle that is .12m wide at the base – figuring this out, I get that the triangle height is 2*2/.12= 33N.
This gives me the spring constant (33N/.12m = 280N/m )*
Given that, it is easy enough to see that area under the curve between the two points in question (.35 and .40 m) is the force of the spring at the mid-point times the base:
[the force at the middle of these two numbers F(.075m) = 21 N] X
[the distance between these two numbers (.05m)] =
The same result as everyone else I suppose, but perhaps just a bit different slant on things.
*note in my mind I have to keep straight that “m” is actually best thought of in this case as “meter (of stretch)” All units are not the same, even when they are measured with a stick with similarly spaced ticks. Most times it is fine, right and just to treat units like any other variable. But there are times when they actually do stand for different things and cancelling them can cause you grief.