0
$\begingroup$

I have the next equation:

enter image description here

I wrote it in mathematica and I obtained

f[h_] = 8 - 5 (-(2 - h) Sqrt[4 h - h^2] + 4 Sec[(2 - h)/2]) 

Now I have to solve it, finding the h. I know that h is between 0<=h<=4 by the Sqrt equation but I don't know how to find the real root. I tried with NSolve or FindRoot but it didn't work.

$\endgroup$
2
  • 2
    $\begingroup$ you know the notation cos^-1 usually denotes inverse cosine not 1/cos..(sec) $\endgroup$ Commented Apr 25, 2018 at 1:21
  • $\begingroup$ indeed changing Sec to ArcCos you should get a solution around h=.74 $\endgroup$ Commented Apr 25, 2018 at 1:29

1 Answer 1

3
$\begingroup$

EDIT: Corrected eqn for missing L

eqn = V == (r^2 ArcCos[(r - h)/r] - (r - h) Sqrt[2 r h - h^2])L; const = {r -> 2, L -> 5, V -> 8}; 

The exact solution for h is a Root object

sol = Solve[eqn /. const, h, Reals][[1]] {h -> Root[{-(8/5) + 4 ArcCos[(2 - #1)/2] - 2 Sqrt[-(-4 + #1) #1] + #1 Sqrt[-(-4 + #1) #1] &, 0.74001521805594051394}]} 

The numeric approximation is

sol // N (* {h -> 0.740015} *) 

Verifying that the solution satisfies the equation

eqn /. const /. sol // FullSimplify (* True *) 

or

eqn /. const /. N[sol] (* True *) Plot[Evaluate[eqn /. const], {h, 0, 4}, Epilog -> {Red, PointSize[Medium], Point[{h /. sol, 0}]}] 

enter image description here

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.