dsolve numerically ignoring the analytical solution

I try to run this line and it didn't work.
syms y(x) c(x) g(x) k(x) x [y1(x), c1(x)] = dsolve(diff(y) == c(x),diff(c) == -(x+1)*c(x)+2*y(x)+(1-x^2)*exp(-x), y(0) == -1, c(0) == 1, 'IgnoreAnalyticConstraints','false');
What's wrong with it?

回答 (1 件)

Torsten
Torsten 2015 年 3 月 26 日

0 投票

What about
syms y(x)
Dy=diff(y);
dsolve(diff(y,2)==-(x+1)*diff(y)+2*y+(1-x^2)*exp(-x),y(0)==-1,Dy(0)==1,'IgnoreAnalyticConstraints',false);
Best wishes
Torsten.

カテゴリ

ヘルプ センター および File Exchange で Dynamic System Models についてさらに検索

タグ

質問済み:

2015 年 3 月 26 日

回答済み:

2015 年 3 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by