Differential equation involving square root

I am absolutely not familiar with differential equations. However, I am facing the following differential equation:

$$$$a(x)y^{\prime}(x)+b(x)y(x)=c(x)\sqrt{y^{2}(x)+d(x)}$$$$

or written differently $$$$y^{\prime}(x) = \tilde{p}(x)y(x)+ \tilde{q}(x)\sqrt{y^{2}(x)+ \tilde{r}(x)}$$$$

If it helps, for simplification one can rewrite using some assumptions on $$\tilde{p}(x)$$ and $$\tilde{q}(x)$$ $$$$y^{\prime}(x) = \frac{1}{|h(x)|^{2}}\left(h(x)h^{\prime}(x)y(x)+q(x)\sqrt{y^{2}(x)+|h(x)|^{2}}\right)$$$$

I checked Zwillinger's handbook on differential equations and Handbook of exact solutions for ordinary differential equations by Andrei Polyanin and Valentin Zaitsev in the hope to find differential equations having a similar form. However, I could not find anything similar.

I tried to solve this equation using MATLAB using the following code:

syms x p(x) q(x) r(x) y(x)
ySq = y(x)^2;
rSq = r(x)^2;
part1 = q(x)*sqrt(ySq + rSq);
part2 = p(x)*y(x);
ode = (diff(y,x) == part1 + part2)
ySol(x) = dsolve(ode)


however, this did not result in a solution. I do not know how to proceed. Can you help me making the next steps or pointing me even to the solution? Thank you very much.

EDIT: Is it of any help if the differential equation is in one of the following forms? \begin{align} y^{\prime}(x) &= f(x)y(x)+g(x)\sqrt{y^{2}(x)+1}\\ y^{\prime}(x) &= g(x)\left(\frac{f(x)}{g(x)}y(x)+\sqrt{y^{2}(x)+1}\right) \end{align}

• Is $h$ complex? Commented Jun 25 at 16:10
• yes, it is complex, but if it helps for the solution, it is fine for now to assume that all functions are real-valued Commented Jun 25 at 21:04
• If $h$ is real you arrive at Carlo Beenakker's solution under the transformation $y=h(x)u$, otherwise I cannot find a solution. Perhaps you can share the exact forms of $h$ and $q$? Commented Jun 25 at 22:03
• thank you for clarification! Commented Jun 27 at 23:25

$$y^{\prime}(x) = f(x)y(x)+g(x)\sqrt{y^{2}(x)+1}.$$ for $$f(x)\equiv 0$$ the solution is $$y(x)=\sinh\left(\int_c^x g(x')dx'\right),\;\;c\in\mathbb{R}.$$ I don't see a closed-form solution for nonzero $$f$$ (unless of course $$g\equiv 0$$).
• Thanks for this comment. What I do not get is that if $\frac{d}{dx} sinh(f(x)) = cosh(f(x))\frac{d}{dx}f(x)$ how can the following hold: $\frac{d}{dx}\,\sinh\left(\int_c^x g(x')dx'\right) = cosh\left(\int_c^x g(x')dx'\right)g(x) \overset{diffEq}{=} g(x)\sqrt{y^{2}(x)+1}$? Why is $cosh\left(\int_c^x g(x')dx'\right) = \sqrt{y^{2}(x)+1}$? Commented Jun 25 at 14:27
• use $\cosh x=\sqrt{\sinh^2 x+1}$ Commented Jun 25 at 14:42