«math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mfrac»«mrow»«mi»d«/mi»«mi»y«/mi»«/mrow»«mrow»«mi»d«/mi»«mi»x«/mi»«/mrow»«/mfrac»«mo»=«/mo»«mo»#«/mo»«mi»e«/mi»«mi»d«/mi»«mi»o«/mi»«/math»
de «math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mi»x«/mi»«mo»=«/mo»«mn»0«/mn»«/math» a «math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mi»x«/mi»«mo»=«/mo»«mo»#«/mo»«mi»x«/mi»«mi»f«/mi»«/math» com «math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mi»y«/mi»«mo»(«/mo»«mn»0«/mn»«mo»)«/mo»«mo»=«/mo»«mo»#«/mo»«mi»y«/mi»«mn»0«/mn»«/math». Resolva a equação utilizando o método explicito de Euler com «math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mi»h«/mi»«mo»=«/mo»«mo»#«/mo»«mi»h«/mi»«/math» .
]]>clear all
dF=inline('equação'); % coloque aqui a equação
h=?; p=?; % Substitua aqui os valores de h (passo) e p (número total de passos)
x(1) = ?; y(1) = ?; % Informe aqui as condições iniciais
for i = 1:p
x(i+1) = x(i) + h;
y(i+1) = y(i) + h*dF(x(i),y(i));
end
Solucacao=y(length(y))
]]>