d1mis

15 Reputation

One Badge

8 years, 44 days

MaplePrimes Activity


These are questions asked by d1mis

Hi! I have the system of differential equations

restart; with(plots); with(DEtools);

a := 1;

deq1 := u(s)*(diff(varphi(s), s, s))+2*(diff(u(s), s))*(diff(varphi(s), s))+sin(varphi(s)) = 0;

deq2 := diff(u(s), s, s)-u(s)*(diff(varphi(s), s))^2-cos(varphi(s))+a*(u(s)-1) = 0;

sol := dsolve({deq1, deq2, u(0) = 1, varphi(0) = (1/4)*Pi, (D(u))(0) = 0, (D(varphi))(0) = 0}, {u(s), varphi(s)}, numeric)

 

which is perfectly solved, but I need to convert it to Cartesian coordinates and draw a plot, so what I tried is

x := u(s)*sin(varphi(s));

y := -u(s)*cos(varphi(s));

plot([x, y, s = 0 .. 20])

 

But I'm getting an error "Warning, expecting only range variable s in expressions [u(s)*sin(varphi(s)), -u(s)*cos(varphi(s))] to be plotted but found names [u, varphi]"

I don't know why is this happens if I have a solution. For example, I can get solution for 2 seconds:

sol(2)

[s = 2., u(s) = 2.33095721668252, diff(u(s), s) = 1.02513293353371, varphi(s) = .213677391510693, diff(varphi(s), s) = -.242430995691885]

 

Hi, I'm trying to solve this ode:
restart; with(plots); with(DEtools);

l := t -> 0.5*tanh(0.5*t);

deq := diff(f(t), t)*l(t)*(diff(f(t), t, t)*l(t)+9.8*sin(f(t)))+diff(l(t), t)*(diff(f(t), t)^2*l(t)-9.8*cos(f(t))+4*(l(t)-0.5)) = 0;

sol := dsolve({deq, f(0) = 0, D(f)(0) = 0.1}, f(t), numeric);

 

but getting an error:

Error, (in dsolve/numeric/checksing) ode system has a removable singularity at t=0. Initial data is restricted to {f(t) = 1.77632183122019}
 

How can I possibly fix this?

Page 1 of 1