wrong differential equation solution
이전 댓글 표시
Hello guys, I have been struggling with a differential equation. I solved it manually, and then double-checked my answer both manually and with Wolfram Alpha, and the answer was right. However, matlab seems to give another answer. The two answers are supposed to be the same, just written in different forms. However, after I copied the Wolfram Alpha answer to matlab, I found out that they are actually not equal.Did I do anything wrong? Thank you.
댓글 수: 2
madhan ravi
2020년 7월 31일
Share the actual code as text instead of pictures.
Graciano Ding
2020년 7월 31일
편집: Graciano Ding
2020년 7월 31일
채택된 답변
추가 답변 (1개)
madhan ravi
2020년 7월 31일
a1 = matlabFunction(simplify(sol));
a = matlabFunction((1/80)*(36*exp(-t)-35*cos(t)-cos(3*t)+125*sin(t)-3*sin(3*t)));
t = linspace(0, 2*pi);
all(abs(a1(t) - a(t)) < 1e-2) % to check if they yield the same results
카테고리
도움말 센터 및 File Exchange에서 Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!