I am trying to solve for the velocity in this problem. I have attached a photo of my work on paper, but I was trying to set it up in matlab using bisection method, but it calls error when I try to input the large term the includes velocity. I have attached my work on paper and my code. One other thing is my work on paper, in the denominator there should be two parentheses on the right, signifying that the entire denominator is being squared. When I run it, it says my parenthesis are wrong, but I thought I did them correctly. Please help.
f = @(x) .625-(x^2/(2*g))*(Km+(L/D)*1/(-1.8log((e/(D*3.7))^1.11+6.9/(Re*x)))^2) ;
fprintf('i=%d \t xl=%f \t xu=%f \t fxl=%f \t fxu=%f \t xr=%f \t fxr=%f \t er=%f\n',i,xl,xu,fxl,fxu,xr,fxr,err)