Jorre

5 Reputation

One Badge

5 years, 277 days

MaplePrimes Activity


These are questions asked by Jorre

Hi

I am doing a differential equation problem and decided to add units. However, when using dsolve i get the error:

"Error, (in dsolve) the units `s` and `1` have incompatible dimensions"
 

Can some of you experts see where i am wrong? 


 

restart

with(Units[Standard])

assume(t >= 0*Unit('s'))

``

Acceleration := diff(h(t), t, t) = g-b*(diff(h(t), t))/mass

diff(diff(h(t), t), t) = g-b*(diff(h(t), t))/mass

(1)

``

``

``

``

Source: https://adventure.howstuffworks.com/skydiving1.htm

b := piecewise(`and`(t >= 0, t < T), b__1, `and`(t >= T, t < infinity), 7*b__1)

piecewise(t < T, b__1, T <= t, 7*b__1)

(2)

T := 60*Unit('s')

60*Units:-Unit(s)

(3)

mass := 80*Unit('kg')

80*Units:-Unit(kg)

(4)

b__1 := 13*Unit('kg'/'s')

13*Units:-Unit(kg/s)

(5)

g := -9.81*Unit('m'/'s'^2)

-9.81*Units:-Unit(m/s^2)

(6)

``

IC := h(0) = 4000, (D(h))(0) = 0

h(0) = 4000, (D(h))(0) = 0

(7)

solution := dsolve({IC, Acceleration}, h(t))

Error, (in dsolve) the units `s` and `1` have incompatible dimensions

 

H := eval(h(t), solution)

Error, invalid input: eval received solution, which is not valid for its 2nd argument, eqns

 

fsolve(H = 0, t, 0 .. infinity)

Error, (in fsolve) H is in the equation, and is not solved for

 

plot(H, t = 0 .. 150, y = 0 .. 4100, axis[2] = [gridlines = 30], axis[1] = [gridlines = 20], labels = ["t [s]", "h(t) [m]"], labelfont = ["Times", 15], color = "red", size = [1000, 1000])

Warning, expecting only range variable t in expression H to be plotted but found name H

 

 

``

``


 

Download Problem_1_test.mw

Page 1 of 1