A car is standing still (x(0)=0,v(0)=0). It accelerates at a rate of
a(t)=v′(t)=dvdt=k1−k2∗v2
Given k1 and k2 and v(tf)=vf solve for x(tf)=xf . (k1,k2 and vf are known values)
My first idea was to solve the differential equation for v(t) but I got a really ugly answer(which I had to look up on Wolframalpha) so I assume I'm doing something wrong.
The idea was that to solve for xf but if you find v(t) , solve for tf you could integrate to find x(t) and then input tf but I'm stuck at the v(t) part. Thanks for help
I think the solutions can be written as:
v=√k1k2tanh(√k1k2t) and x=ln(cosh(√k1k2t))/k2
which I obtained by guessing a few forms for the velocity and manipulating them until they matched numerical solutions for all the values of k1 and k2 that I tried!! I've no doubt there is a more straightforward way of doing it!!
If you've been there before, so to speak, and you know what the solution is to look like, then Alan's ' trial solution ' method is quickest.
Assume that
v=Atanh(Bt), thendvdt=AB sech2(Bt)=AB(1−tanh2(Bt))=AB−BAv2
Equate coefficients with the given equation and solve for A and B.
If you have to get there from scratch, with one eye on the upcoming algebra, write dvdt=k2(K2−v2), where, for convenience, K2=k1/k2.
then ∫dvK2−v2=∫k2dt
12K∫1K+v+1K−vdv=12Kln(K+vK−v)=k2t+C, v=0 when t=0, so C=0.
K+vK−v=e2Kk2t from which v=K(e2Kk2t−1e2Kk2t+1)=K(eKk2t−e−Kk2teKk2t+eKk2t)=K(sinh(Kk2t)cosh(Kk2t))=Ktanh(Kk2t).
Substitution for K now gets us the earlier mentioned solution (Alan's solution).
To find x, integrate wrt t,
∫vdt=x=K∫tanh(Kk2t)dt=KKk2ln(cosh(Kk2t))+D and since x=0 when t=0,D=0.
Substituting for K,
x=1k2ln(cosh(√k1k2t)