# Similar Curves

**Algebra**Level 5

**similar**in the range \([a,b]\) if for all \(x\) in the range \([a,b]\) we have \(|f(x)-g(x)|\le 1\).

Let \(f(x)\) be the half-hyperbola \(y=\sqrt{x^2+1}\) and let \(g(x)\) be a parabola with equation \(y=mx^2+n\).

If \(f(x)\) and \(g(x)\) are **similar** in the range \([p,q]\) where \(p\le q\), then the largest possible value of \(q-p\) can be expressed as \[a\sqrt{b+c\sqrt{d}}\] for positive integers \(a,b,c,d\) with \(d\) square-free. Find \(a+b+c+d\).