# Mathematica Inverting dispersion relation with Mathematica

#### Takeshin

Hi guys,

I'm currently working on a project related to Faraday instability, and I of course came across the dispersion relation for capillary-gravity waves, i.e.

ω² = tanh(kh)(gk + σk³/ρ) .

Now I would need to numerically solve this relation for the wavenumber k as a function of depth h (in fact, this is the wavelength I'm interested in, but this is given freely if I know the wavenumber). My first reflex was to rewrite this relation in terms of h as a function of k

h = (1/k) arctanh [ω² (gk + σk³/ρ)^(-1) ]

and then try to invert it with Mathematica (which I'm not really familiar with, but it seemed the easiest choice to me). I tried using Findroot, with something like this :

h[x_] := (1/x) ArcTanh[((70 \[Pi])^2)/ (9.81x +
(0.0206 x³/950) )]
hmax = 0.01;
hmin = 0.001;
dh = 0.0001;
Sol = Table[{{b -> i}, FindRoot[i == h[x], {x, 0.001}]} //
Flatten, {i, hmin, hmax, dh}];

but this seems to stumble upon some convergence error (here I replaced ω, ρ and σ with numerical values related to my experimental setup), and I found nothing that seemed really helpful in the doc. Does anyone have an idea on what I should try to make it work ?

Thanks in advance for you replies. Related Math Software Workshop News on Phys.org

### Want to reply to this thread?

"Inverting dispersion relation with Mathematica"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving