1
$\begingroup$

I am trying to solve this differential equation with DSolve:

$$\ddot{y}(t) = \frac{c-t\,a}{\sqrt{(c-t\,a)^2+(d-t\,b)^2}}$$

This is the command I used:

DSolve[y''[t] == (c - t*a)/Sqrt[(c - t*a)^2 + (d - t*b)^2], y[t], t]

The solution is not pretty, but after using FullSimplify, I get:

enter image description here

Now the problem is that for $t = 0$ I should get $y(t=0) = C[1]$ but instead I get this:

enter image description here

In addition I integrated the function numericaly and for

a = -0.067188179319158187
b = -0.49514533746770106
c = -0.33442811816228007
d = -2.0301335303268586
t = 8.0973579559937114

with the initial values

c[1] = 10.0
c[2] = -2.0

The function should be zero, but that is also not true. I am not sure if I made a mistake or if it is a problem with DSolve; my best guess would be that because the solution to differential quations are always definite integrals. I would need to incorporate the upper and lower bounds similar to what is mentioned in this thread, However. I don't know how I would do that.

It would be great if someone could help!

$\endgroup$
  • 5
    $\begingroup$ I'm voting to close this question as off-topic because the issued raised is not really a problem; it is arises from the OP's misunderstanding of the result returned by Mathematica. $\endgroup$ – m_goldberg Nov 22 '16 at 14:10
  • 1
    $\begingroup$ Try DSolve[{y''[t] == (c - t*a)/Sqrt[(c - t*a)^2 + (d - t*b)^2], y[0] == y0, y'[0] == v0}, y[t], t] and see if you agree with the solution. $\endgroup$ – b.gates.you.know.what Nov 22 '16 at 14:51
  • $\begingroup$ Thank you that's the solution! But shouldn't it work with the arbitrary constants the same way? Sorry if that's off topic. $\endgroup$ – Ganymed_ Nov 22 '16 at 15:00
  • $\begingroup$ @Ganymed_ What the user who answered below was saying is that unless you impose what y[0] is as a constraint, any constant value will satisfy the equation and therefore is a valid solution. $\endgroup$ – b.gates.you.know.what Nov 22 '16 at 15:20
3
$\begingroup$

Since

y[0] /. 
  C[1] -> 
    (-(1/(a^2 + b^2)^(3/2)))*
         (-((b*(b*c - a*d)*Sqrt[c^2 + d^2])/Sqrt[a^2 + b^2]) + 
         (a*(a*c + b*d)*Sqrt[c^2 + d^2])/(2*Sqrt[a^2 + b^2]) - 
         (a*((-b)*c + a*d)^2*Log[(-a)*c - b*d + Sqrt[a^2 + b^2]*
            Sqrt[c^2 + d^2]])/(2*(a - I*b)*(a + I*b)) + 
         (b*(b*c - a*d)*((-a)*c - b*d)*
            Log[(-a)*c - b*d + Sqrt[a^2 + b^2]*Sqrt[c^2 + d^2]])/(a^2 + b^2))

gives 0. there is nothing wrong with your result. Two solutions to a differential equation can always differ by an arbitrary constant.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Yes, c[1] and c[2] are the arbitrary constants but if $\ddot{y}(t)$ is the acceleration of a point then c[1] is the initial position, c[2] the initial velocity and $t$ the elapsed time. So I expect that my point is at c[1] at $t = 0$. $\endgroup$ – Ganymed_ Nov 22 '16 at 14:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.