In my computer-aided-problem-solving class, I am asked to determine the height of a trough, through a root-finding method. I can choose between the bisection method, Newton's method or successive substitution. Whichever method I choose, I should determine the height via the method in MATLAB.
I have no idea how one of these methods is going to help me find the depth of the trough?
The following formula is given: $$V = L \left( r^2 \arccos\left(\frac{h}{r}\right) -h \sqrt{r^2-h^2}\right)$$
Where V is the volume of the trough, which has a value of $0.35\,\text{m}^3$.
$L$ is the length, which has the value of $3\,\text{m}$.
Finally the "radius" of the trough is $r=0.3\,\text{m}$.
I should give an answers with an accuracy of 6 digits.
I attached a picture of the trough.
Can someone help me with this?? Thanks

One approach would be to do it using Newton's method. We want to solve the equation $f(h)=0$, with
$$ f(h) = L\left( r^2 \arccos \left(\frac{h}{r}\right) - h\sqrt{r^2-h^2} \right) - V $$
With Newton's method, we start out with an initial value (e.g., $h_0 = 0$), and then iterate, until we converge:
$$ h_{n+1} = h_n - \frac{f(h_n)}{f'(h_n)}. $$
Here, $f'(h)$ represents the derivative, which happens to be $$ f'(h) = -2L\sqrt{r^2-h^2}, $$ in your case. If you will do this, you'll find $h=0.041306\,\text{m}$.
Here is the code: