Problem 5: Osteoporosis in Chinese women (5 pts) The variations in age-related s
ID: 3586294 • Letter: P
Question
Problem 5: Osteoporosis in Chinese women (5 pts) The variations in age-related speed of sound (SOS) at the tibia and the prevalence of osteoporosis in native Chinese women have been studied. They obtained the following relationship between the SOS and the age in years Y: sos 3383 +39.9Y - 0.78Y2 +0.0039y3 where the SOS is expressed in units of m/s. The SOS for one research subject is measured to be 3850 m/s. Use a numerical method to determine her most likely age. Take Y 45 years as your initial guessExplanation / Answer
% I am using newton raphson method to solve the following problem.
% inputs
initialGuess=45;
tolerance=1e-8;
% function
f=@(x) 0.0039*x^3-0.78*x^2+39.9*x-467;
% iterations
iterations=1;
maximumIterations=1000;
d=@(x) 3*0.0039*x^2-2*0.78*x+39.9;
x(1)=initialGuess;
error=100;
while error>tolerance
x(iterations+1)=x(iterations)-((f(x(iterations))/d(x(iterations))));
error=abs((x(iterations+1)-x(iterations))/x(iterations));
iterations=iterations+1;
if(iterations==maximumIterations)
break;
end
end
root=round(x(iterations));
fprintf('Her most likely age: %d ', root);
% The output is coming as 57