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!