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!