0
$\begingroup$

i'm having trouble using DSolve for the following equation, which is the position equation of an object moving up a straight hill

My facts are:

g = 9.8
m = 250
u = 0.03
c = 0.74304

And my equation is

DSolve[{ x''[t] == -g*Sin[o]*Cos[o] - (c*x'[t])/m - Cos[o]^2*u*g,
y''[t] == - g + g Cos[o]^2 - (c y'[t])/m-u*g*Sin[o]*Cos[o], 
x[0] == 0, y[0] == 0, x'[0] == v0 Cos[o], y'[0] == v0 Sin[o]}, {x[t], y[t]}, t]

I've been checking, and the Built-in guide is not quite useful since the format it suggests does not work for me, if I don't use the [t] at the end while stating the {x,y},t].

thank you!

$\endgroup$

1 Answer 1

0
$\begingroup$

Rationalize the parameters

params = Rationalize[{g -> 9.8, m -> 250, u -> 0.03, c -> 0.74304}, 0]

Now you can solve your problem

DSolve[{x''[t] == -g*Sin[o]*Cos[o] - (c*x'[t])/m - Cos[o]^2*u*g, 
   y''[t] == -g + g Cos[o]^2 - (c y'[t])/m - u*g*Sin[o]*Cos[o], 
   x[0] == 0, y[0] == 0, x'[0] == v0 Cos[o], y'[0] == v0 Sin[o]} /. 
  params, {x[t], y[t]}, t]
$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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