%% Solution HW9
% Tim Placek (placetd@auburn.edu)
clear;
clc;
clf;

%%
% Solution of first order differential equation
% Function f_quiz041112 is an external function...
% ...in this case dydx is piecewise continuous
yo=2;
xo=0;
xf=9;
xx=linspace(xo,xf,301);
for k=1:length(xx)
yy(k)=f_quiz041112(xx(k),[]);
end
subplot(1,2,1)
plot(xx,yy)
%%
z=cumtrapz(xx,yy);
subplot(1,2,2)
plot(xx,z+yo)