That is the explanation. For ever height down, the radius grows with 1/4 the height. The formula for the volume of a cone according to google is: V=Pi*(r^2)*h/3, and that gives the formula volume V=Pi*((x/4)^2)*x/3. Its as easy as that. Nothing more to explain there. Im not going to wright a scripture about one question.
For the sphere it took the formula i got from a question i asked earlier. solve(x^2 + y^2 = 4, y), that gave sqrt(-x^2 + 4) and -sqrt(-x^2 + 4). That was for a circle with a radius of 2. I rewrote the formula to fit a circle radius of 1, and a rewrote it so that it fitted to what i needed on the x and y axis. Then i took the volume of a sphere: V= 4/3*Pi*r^3. Then I took 1/2 the sphere for the first part, and then the other half for the second part. Then i multieplied it with 9.81 with both parts. Multiplied the integration of the parts of the formulas relevant to the solution with 1000 and then got the answer in Joule.
The earlier part of the bottom of the sphere was rewritten to fit the situation this time. It was used as a ratio for just one half a sphere with a redius of 2 meters. The half volume of a Sphere was used, because half a sphere was asked for, and then i did the same thing as i did with b.
Also i am not going to do some promotion scripture on how to do this, i think the explanation here is good enough.
It took a while to figure it out. But in the end it was not too hard at all. You just need a lot of repetition.
That actually reminds me of a guy called Wernher von Braun, he started as an amateur rocket enthusiast, and he was really bad at math. But when he realized math was what he needed to achieve his goals, he started to do a lot of math. In the end he became one of the greatest rockets scientists of all time!