| > | restart; |
| > | ode := diff(u(t),t,t)+u(t)=-eps*diff(u(t),t)*(u(t)^2-sin(t*eps^2)); |
| > | eps := 0.2; |
| > | sol := dsolve({ode, u(0)=1, D(u)(0)=0}, numeric, maxfun=0); |
| > |
| > | with(plots): |
| > | odeplot(sol, [t, u(t)], 0..2000, numpoints=10000); |
| > | pic := %: |
| > | ode2 := diff(A(tau),tau)=-A(tau)^3/8+sin(tau*eps)*A(tau)/2; |
| > | sol2 := dsolve({ode2, A(0)=1}, numeric); |
| > | odeplot(sol2, [tau/eps, A(tau)], tau=0..2000*eps, numpoints=400, color=black, thickness=3); |
| > | pic2 := %: |
| > | display(pic2, pic); |
| > |
| > |
| > |