# Thread: Trying to solve dv/dt=g-kx

1. ## Trying to solve dv/dt=g-kx

The solution x(t) is needed for $$\dot v=g-kx$$

These apply: $$v(0) = x(0) = 0$$ and $$v = \dot x$$

I went with $$\frac {dv} {dt}=v\frac {dv} {dx}$$ and got

$$\frac {dv} {dt}=g-kx$$
$$v\frac {dv} {dx}=g-kx$$
...
$$v^2 = 2gx - kx^2 + C$$

At v(0)=0 the constant C=0

Now is $$v^2=(\frac {dx} {dt})^2$$ the only way to proceed or is there something simpler?

Thanks

2. ## Re: Trying to solve dv/dt=g-kx

so we've got

$\ddot{x} + k x = g$

let's solve the homogeneous equation first

$\ddot{x}+k x=0$

the characteristic equation is

$s^2 + k= 0$

and this has solutions

$s = \pm i\sqrt{k}$

this in turn leads to time domain solutions of

$x_h(t) = c_1 \cos( \sqrt{k} t) + c_2 \sin( \sqrt{k} t)$

plugging this into the original equation and solving we get

$x(t) = x_h(t) + \dfrac g k = c_1 \cos( \sqrt{k} t) + c_2 \sin( \sqrt{k} t) + \dfrac g k$

3. ## Re: Trying to solve dv/dt=g-kx Originally Posted by romsek ...
has solutions

$$s = \pm i\sqrt{k}$$

this in turn leads to time domain solutions of

$$x_h(t) = c_1 \cos( \sqrt{k} t) + c_2 \sin( \sqrt{k} t)$$
Thanks for answering, this is good stuff

I have not used this kind of method before and trying to search info at the moment. How does time domain solutions work?