Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. F: 'diff(y,x)^2 + 2*y^2 + 3*y*exp(2*x)*sin(x) - 5*cos(x);
  2. Dy: 'diff(y,x);
  3. FDy: diff(F,Dy);
  4. eqn: diff(FDy,x) + diff(FDy,y)*'diff(y,x) + diff(FDy,Dy)*'diff(y,x,2) - diff(F,y) = 0;
  5. eqn2:subst(Dy='diff(y,x),eqn)$
  6. sol:ode2(eqn2,y,x)$
  7. sol2:bc2(sol, x=0, y=1, x=2, y=2)$
  8. f:subst([x=0,y=1],sol);
  9. eq2:subst([Dy=diff(rhs(sol),x),y=rhs(sol)],FDy=0)$
  10. eq2:subst([x=1],eq2)$
  11. con:solve([f,eq2],[%k1,%k2]);
  12. con2:subst(con,sol);
  13. wxplot2d([rhs(sol2),rhs(con2)],[x,0,1],[xlabel,"X"],[ylabel,"Y"]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement