# Exercici 12.20

## Apartat a)

kill(all)$

EDO: 'diff(y, t) = sqrt(t + y);

ode2(EDO, y(t), t);

fpprintprec : 5$

soluc1: rk( [sqrt(t + y) ], [y], [0] , [t, 0, 10, 0.5] );

wxplot2d( [ [discrete, soluc1] ] , [style, [points, 1, 1, 2] ]  );

soluc2: rk( [sqrt(t + y) ], [y], [0] , [t, 0, 10, 0.2] );

wxplot2d( [ [discrete, soluc2] ] , [style, [points, 1, 1, 2] ]  );

## Apartat b)

kill(all)$

EDO: 'diff(y, t) = (t + y - 1)^2;

ode2(EDO, y(t), t);

fpprintprec : 5$

soluc1: rk( [(t + y - 1)^2 ], [y], [2] , [t, 0, 0.5, 0.05] );

wxplot2d( [ [discrete, soluc1] ] , [style, [points, 1, 1, 2] ]  );

soluc2: rk( [(t + y - 1)^2 ], [y], [2] , [t, 0, 0.5, 0.01] );

wxplot2d( [ [discrete, soluc2] ] , [style, [points, 1, 1, 2] ]  );

## Apartat c)

kill(all)$

EDO: 'diff(y, t) = - log(t + y + 2);

ode2(EDO, y(t), t);

fpprintprec : 5$

soluc1: rk( [- log(t + y + 2) ], [y], [5] , [t, 0, 10, 0.5] );

wxplot2d( [ [discrete, soluc1] ] , [style, [points, 1, 1, 2] ]  );

soluc2: rk( [- log(t + y + 2) ], [y], [5] , [t, 0, 10, 0.2] );

wxplot2d( [ [discrete, soluc2] ] , [style, [points, 1, 1, 2] ]  );