Home > Education, Homework > Numerical Methods Homework – Problem 8.9

## Numerical Methods Homework – Problem 8.9

##### The Problem

The volume V of liquid in a spherical tank of radius r is related to the depth h of the liquid by:


Determine h given r = 1m and V = 0.5m³

##### MATLAB Code
clear;
V = 0.5;
r = 1;

f = @(h)(h.^2.*(h-3*r)+3*V/pi);
df = @(h)(3*h*(h-2*r));
d2f = @(h)(6*h-6*r);

x = (-2:.001:2);
plot(x,f(x));
X = NewtonRaphson(f,df,d2f,r,100);
hold on
plot(X(end),0,'*')
Categories: Education, Homework
1. No comments yet.
1. No trackbacks yet.