How to plot a differential equation?
Mostra commenti meno recenti
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 Commenti
Torsten
il 16 Mag 2018
Please insert multiplication signs and clarify what is meant by [5(x-1/3)^+].
Best wishes
Torsten.
Chong Zhang
il 16 Mag 2018
Torsten
il 16 Mag 2018
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
il 16 Mag 2018
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
il 16 Mag 2018
Modificato: Chong Zhang
il 16 Mag 2018
Torsten
il 16 Mag 2018
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
il 16 Mag 2018
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Boundary Value Problems in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!