Question: How to make horizontal and vertical motion into one system

f describe the horizontal motion

g describe the vertical motion

h := sin(t);    

g := piecewise(t < 0, Diff(x(h),h$2)+2*Diff(x(h),h)+10*x(h), t > 0,Diff(x(h),h$2)-2*Diff(x(h),h)+10*x(h));

dsolve([g,h]);

can not solve

Error, (in unknown) invalid input: diff received sin(t), which is not valid for its 2nd argument

 

f := sin(m(t));   
g := piecewise(t < 0, Diff(x(m(t)),m(t)$2)+2*Diff(x(m(t)),m(t))+10*x(m(t)), t > 0,Diff(x(m(t)),m(t)$2)-2*Diff(x(m(t)),m(t))+10*x(m(t)));

origin from my design
    g := piecewise(t < 0, Diff(x(t),t$2)+2*Diff(x(t),t)+10*x(t), t > 0, Diff(x(t),t$2)-2*Diff(x(t),t)+10*x(t));    plot(subs(_C2=1,subs(_C1=1,rhs(dsolve(g, x(t))))), t=-5..5);    plot(subs(_C2=1,subs(_C1=1,rhs(dsolve(g, x(t))))), t=-1..1);    eq := diff(g,x(t))-diff(diff(g,diff(x(t),t)),t);

Please Wait...