Can manually solve system of ODEs but can't with dsolve

1 回表示 (過去 30 日間)
Wesley Neill
Wesley Neill 2019 年 2 月 10 日
コメント済み: Walter Roberson 2019 年 2 月 10 日
Good evening,
I'm using MATLAB for the first time and have been trying to apply the dsolve documentation, here.
>> syms y1(t) y2(t)
A = [0 1; -2/(t^2) 2/t];
Y = [y1; y2];
G = [t^4; t^3];
C = Y(2) == [1; 4];
odes = diff(Y) == A*Y + G;
[sol1(t), sol2(t)] = dsolve(odes, C);
I have been able to solve this by hand fairly easily. I just wanted to use it as an opportunity to start learning MATLAB. However, I get the error:
Warning: Unable to find explicit solution.
> In dsolve (line 201)
ans =
[ empty sym ]
I believe I have followed the tutorial in the documentation exactly, only changing it to match a problem in my textbook. Thanks for your help.
  4 件のコメント
Wesley Neill
Wesley Neill 2019 年 2 月 10 日
Madhan, yes that is correct.
Walter, how am I to know what this function is reasonably capable of and what it is not?
Walter Roberson
Walter Roberson 2019 年 2 月 10 日
What I mean is that if you did a whole bunch of analysis and manipulation you just might be able to force matlab to find a solution, but it might be difficult or a nuisance to do. It might match a well known pattern but not one built in to dsolve.
The limitations of dsolve and the forms handled are not documented . The implementation is at the MuPAD level so to view the code you would need to go in at that level and use the MuPad expose() call and figure out what the code means . I do not recommend that .

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeUtilities for the Solver についてさらに検索

タグ

製品


リリース

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by