# Plotting a ArcCos function

I didn't manage to plot a simple function with ArcCos.

Plot[ArcCos[(x + 1)/Sqrt[x]], {x, -1, 1}] 


With this function, the plot returned is empty.

Do you have some ideas for conducting this plotting ?

Replay

The function is complex-valued, try

Plot[Re[ArcCos[(x + 1)/Sqrt[x]]], {x, -1, 1}]



Whenever the square root of a complex number is used here, we choose the root with the positive real part (or positive imaginary part if the square was negative real).

$\arccos x=2 \arctan \frac{\sqrt{1-x^2}}{1+x}, if -1<x\le 1$

Plot[Im[2 ArcTan[Sqrt[-x^2 - x - 1]/Sqrt[x] + x + 1]], {x, -1, 1}]



The same for the real part:

 Plot[Re[2 ArcTan[Sqrt[-x^2 - x - 1]/Sqrt[x] + x + 1]], {x, -1, 1}]



Category: plotting Time: 2015-10-15 Views: 0
Tags: plotting