How to solve 2nd order differential equations while variables are coupled?
조회 수: 2 (최근 30일)
이전 댓글 표시
(w-1)*U1r-d(U1i)/dx+L*U2r-m*d^2(U1r)/dx^2=0;
(w+1)*U1i+d(U1r)/dx+L*U2i+m*d^2(U1i)/dx^2=0;
(w-1)*U2r-d(U2i)/dx+L*U1r-m*d^2(U2r)/dx^2=0;
(w+1)*U2i+d(U2r)/dx+L*U1i+m*d^2(U2i)/dx^2=0;
How to solve U1r, U1i, U2r, and U2i by using MATLAB symlbolic tool ?
Thanks in advance.
댓글 수: 0
채택된 답변
Birdman
2020년 4월 1일
Try the following code:
syms w U1r(x) U1i(x) U2i(x) U2r(x) L m d
eq1=(w-1)*U1r-diff(U1i)+L*U2r-m*diff(U1r,2)==0;
eq2=(w+1)*U1i+diff(U1r)+L*U2i+m*diff(U1i,2)==0;
eq3=(w-1)*U2r-diff(U2i)+L*U1r-m*diff(U2r,2)==0;
eq4=(w+1)*U2i+diff(U2r)+L*U1i+m*diff(U2i,2)==0;
solx=dsolve([eq1 eq2 eq3 eq4]);
%%solutions
U1r(x)=solx.U1r;
U1i(x)=solx.U1i;
U2r(x)=solx.U2r;
U2i(x)=solx.U2i;
댓글 수: 6
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!