How to plot a differential equation?
古いコメントを表示
How to plot the differential equation
(x-2/3)*f'(x)=6*f(x)-2+[5*(x-1/3)^+]-5*f(min([x+1/3,2/3]))?
f(0)=0.8, x from 0 to 2/3
8 件のコメント
Torsten
2018 年 5 月 16 日
Please insert multiplication signs and clarify what is meant by [5(x-1/3)^+].
Best wishes
Torsten.
Chong Zhang
2018 年 5 月 16 日
Torsten
2018 年 5 月 16 日
And what does
f(min([x+1/3,2/3]))
mean ?
Is min(x+1/3,2/3) really the argument for f ?
Chong Zhang
2018 年 5 月 16 日
So your equation reads
(x-2/3)*f'(x)=6*f(x)-2+5*(x-1/3)-5*f(2/3) if 1/3 <= x <= 2/3
(x-2/3)*f'(x)=6*f(x)-2-5*f(x+1/3) if 0 <= x <= 1/3
and f(2/3), f(x+1/3) really means: f evaluated at 2/3 and f evaluated at x+1/3, respectively ?
Chong Zhang
2018 年 5 月 16 日
編集済み: Chong Zhang
2018 年 5 月 16 日
Torsten
2018 年 5 月 16 日
1. Assume a value for f(1/3) and name it "fmiddle".
2. Solve the differential equation on the interval 1/3 <= x <= 2/3 using bvp4c with f(2/3) as a free parameter.
3. Solve the differential equation on the interval 0 <= x <=1/3 using ODE45 by using the solution from 2 to evaluate f(x+1/3).
4. Compare f(1/3) obtained from the solution in 3. and "fmiddle". If abs(f(1/3)-fmiddle) < tol, accept the solution for f. Otherwise update "fmiddle" and go to 2.
Best wishes
Torsten.
Chong Zhang
2018 年 5 月 16 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Boundary Value Problems についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!