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$
    – george2079
    Apr 25, 2018 at 1:21
  • $\begingroup$ indeed changing Sec to ArcCos you should get a solution around h=.74 $\endgroup$
    – george2079
    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$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.