0
$\begingroup$

I'm trying to solve a physics problem using DSolve, and I've been getting varying degrees of success depending how I write down the equation.

Here is what worked:

DSolve[
  {v'[t] == -g - b/m v[t], x'[t] == v[t], x[0] == h, v[0] == v0}, 
  {x[t], v[t]}, t] // ExpandAll

and

DSolve[
  {v'[t] == -g - b/m x'[t], x'[t] == v[t], x[0] == h, v[0] == v0}, 
  {x[t], v[t]}, t] // ExpandAll

but these give me an error:

fall = 
  DSolve[
    {x''[t] == -g - b/m v[t], x'[t] == v[t], x[0] == h, v[0] == v0}, 
    {x[t], v[t]}, t] // ExpandAll

fall = 
  DSolve[
    {x''[t] == -g - b/m x'[t], x'[t] == v[t], x[0] == h, v[0] == v0},
    {x[t], v[t]}, t] // ExpandAll

and the error says that "the function v appears with no arguments."

I'm confused because 1) I'm pretty sure all of my vs are written with its argument t and 2) I don't understand why the simple change from v'[t] to x''[t] causes an error. Shouldn't Mathematica know that v'[t] == x''[t] since I specified that v[t] == x'[t]?

And why do I only get an error when changing that first v'[t] to x''[t], and not when I change the v[t] to x'[t] as seen in the first two equations?

$\endgroup$
  • 2
    $\begingroup$ Works fine on MMA 11.3.Try clear the kernel: ClearAll["Global`*"]; Remove["Global`*"]; $\endgroup$ – Mariusz Iwaniuk Aug 17 '18 at 18:14
  • 1
    $\begingroup$ I was using the ClearAll command, but not the Remove one. Using both fixed the problem, thanks! $\endgroup$ – wjdgone Aug 26 '18 at 12:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.