i am trying nonlinear for nonlinear ode using by finite difference method

14 vues (au cours des 30 derniers jours)
Otgondorj
Otgondorj le 17 Mar 2023
Modifié(e) : Otgondorj le 18 Mar 2023
i am trying nonlinear for nonlinear BVP using by finite difference method.
y''+a*e^y=0, y(0)=y(1)=0.
The difference equations:
\frac{y_{i+1}-2y_i+u_{i-1}}{h^2}+a* e^{y_i}=0, i=1,\dots, n-1,
Code:
maxiter=4;
lamb=1;
n=20;
Unrecognized function or variable 'df'.

Réponses (1)

Torsten
Torsten le 17 Mar 2023
Modifié(e) : Torsten le 17 Mar 2023
You want to solve a nonlinear system of equations using Newton's method, but you didn't supply the Jacobian "df". i.e.
df{i}/dx(j) (i,j = 2,...,n-1).

Community Treasure Hunt

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

Start Hunting!

Translated by