Question: How to draw a plot in my situation?

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]

 

Please Wait...