Compute definite integrals with tanh? no output

I am trying to compute the following definite integral,

Integrate[Sqrt[g*m]Divide[Tanh[Divide[Sqrt[g*k],Sqrt[m]]x],Sqrt[k]],{x,0,x}]

(Paste this into Wolfram to see it)

If you are too lazy, it is basically the definite integral from 0 to x of some constants multiplied by tanh(constants*x) dx

For some reason, even though I have Wolfram Pro, it attempts to compute this integral for less than 10 seconds, then just stops, with no answer, no error message, nothing.

What is going on? Is the integral simply too hard for Wolfram to compute? Please help.

On Mathematica “13.2.0 for Mac OS X ARM (64-bit) (November 18, 2022)”, after ~25s I get

(Sqrt[m] Sqrt[g m] Log[Cosh[(Sqrt[g k] x)/Sqrt[m]]])/(Sqrt[k] Sqrt[g k])

Thank you so much

For me it seem to be way faster if it is done like so:

anitDeriv = Integrate[Sqrt[g*m] Divide[Tanh[Divide[Sqrt[g*k], Sqrt[m]] x], Sqrt[k]], x];
integ = anitDeriv (*at x anyway*) - (anitDeriv /. x -> 0)

It would be interesting to know what the reason for this effect might be.

I guess that with a definite integral Mathematica tries to work out possible branch cuts. Adding assumptions makes the computation faster on my system, starting from a fresh kernel:

Integrate[
 Sqrt[g*m] Divide[Tanh[Divide[Sqrt[g*k], Sqrt[m]] x], Sqrt[k]],
 {x, 0, t},
 Assumptions -> And[g > 0, k > 0, m > 0, Element[t, Reals]]]

Computing a primitive is exempt from such checks.