maxwell

25 Reputation

4 Badges

8 years, 156 days

MaplePrimes Activity


These are questions asked by maxwell

I'm trying to solve

deq := diff(theta(x), x) = -sin(theta(x));
                         
sol := dsolve({deq, theta(0) = -(1/2)*Pi});
 

The answer should be theta=-2*arctan(exp(-x))

but I get

theta(x) = arctan(2*exp(-x+I*Pi)/((exp(-x+I*Pi))^2+1), -((exp(-x+I*Pi))^2-1)/((exp(-x+I*Pi))^2+1))

Does it have to do with assuming?

Staffan Malmberg

 

I get no output from the following

deqv := m*v(s)*(diff(v(s), s)) = m*g-k*v(s)^2

I have to write

solv := `assuming`([dsolve({deqv, v(0) = v__0}, v(s), implicit)], [v__0 > 0])

in order to get

-g*m/k-exp(-2*k*s/m)*(-g*m/k+v__0^2)+v(s)^2 = 0

and then I have to write my own function

It should be a piece of cake for maple to solve this!

Staffan

 


 

 

 

 

 

I'm trying to plot the velocity of a ball thrown upwards with air resistance proportional to v^2 and also some simpler forms of this.

But the solution to v^2 returns root of and the plot stops for some specific time value. How can I proceed this plot to let's say 10 sec?

Staffan


 

``

``

restart

``

deq1 := m*(diff(v(t), t)) = -m*g:

``

sol := dsolve({deq1, v(0) = v__0}, v(t))

v(t) = -g*t+v__0

(1)

V := unapply(rhs(sol), t):

``

``

``

deq2 := m*(diff(v2(t), t)) = -m*g-k*v2(t):

``

sol2 := dsolve({deq2, v2(0) = v__0}, v2(t))

v2(t) = -g*m/k+exp(-k*t/m)*(v__0+g*m/k)

(2)

V2 := unapply(rhs(sol2), t):

``

deq3 := m*(diff(v3(t), t)) = -m*g-k*v3(t)*abs(v3(t))

m*(diff(v3(t), t)) = -m*g-k*v3(t)*abs(v3(t))

(3)

sol3 := dsolve({deq3, v3(0) = v__0}, v3(t))

v3(t) = RootOf(t+m*piecewise(_Z <= 0, arctanh(k*_Z/(k*m*g)^(1/2))/(k*m*g)^(1/2), 0 < _Z, arctan(k*_Z/(k*m*g)^(1/2))/(k*m*g)^(1/2))-m*piecewise(v__0 <= 0, arctanh(k*v__0/(k*m*g)^(1/2))/(k*m*g)^(1/2), 0 < v__0, arctan(k*v__0/(k*m*g)^(1/2))/(k*m*g)^(1/2)))

(4)

V3 := unapply(rhs(sol3), t):

``

m := 0.258e-2:

``

plot([V(t), V2(t), V3(t)], t = 0 .. 5, color = [blue, red, black], gridlines = true)

 

``


 

Download tal_3.9_sid_66_b.mw

1 2 Page 2 of 2