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

1 次查看(过去 30 天)
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 个)

标签

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by