Question: I am working on a physics reserach project for school and I have run into some troubles working Mathematica. I am a fairly inexperienced mathematica user so any help would very much be appreciated.

I need to find the roots of the transcendental equation 
$$\zeta\_n \tan(\zeta) - \sqrt{R^2-\zeta^2\_n}=0$$
and then collect them into a list, $\{\zeta\_n\}$, which I can sum over.

FindRoot works but only finds one root at a time. For example $R^2=18$ gives

> 
> FindRoot[Sqrt[18. - zeta^2] - zeta Tan[zeta] == 0, {zeta, 3}]
> 
> 
> {zeta -> 3.66808}
>  From a plot of the function I know there should be two roots for this particular value of $R$, however FindRoot only gives one.
> 
> 
> 

I have had no luck with NSolve or Solve either. 

> 
> NSolve[xi[zeta, Erg4]- zeta\*Tan[zeta] == 0, zeta]
> 
> 
> NSolve[Sqrt[18. - zeta^2] - zeta Tan[zeta] == 0, zeta]
> 
> 
> 

Also once I have succeeded in finding all roots how does one put them in an indexed set ${\zeta\_n}$.

Answer: 
If the goal is only to obtain the sum of positive roots, then 

```
f[r_] := Total[ζ /. NSolve[{Sqrt[r^2 - ζ^2] - ζ Tan[ζ] == 0, 
           r^2 - ζ^2 >= 0, ζ > 0}, ζ]]

```

produces this quantity. For instance,

```
Plot[f[r], {r, .1, 10}, AxesLabel -> {R, Total}]

```

![Mathematica graphics](https://i.stack.imgur.com/nb0Pz.png)

`Quiet` is used only to suppress the occasional information message,

```
Solve::ratnz: Solve was unable to solve the system with inexact coefficients. The answer was obtained by solving a corresponding exact system and numericizing the result. >>

```
If you only want real solutions, then `NSolve` will find them if we help it by including the domain for `zeta`.

```
R = Sqrt[18];
sol = NSolve[Sqrt[R^2 - zeta^2] - zeta Tan[zeta] == 0 && -R <= zeta <= R]
(*
  {{zeta -> -3.66808}, {zeta -> -1.26743},
   {zeta -> 1.26743},  {zeta -> 3.66808}}
*)

```

You can save them in an indexed list like this:

```
roots = zeta /. sol
(*  {-3.66808, -1.26743, 1.26743, 3.66808}  *)

```