# Tema 12
12-3  Ecuaciones diferenciales 
          ordinarias de orden 2

kill(all)$

Ejemplo 12.3.1

EDO_1: 'diff(y, t, 2) - y*'diff(y, t)^3 = 0;

ode2(EDO_1, y, t);

ic2(%, t=0, y=0, 'diff(y,t)=2);

ratsimp(%);

load(draw)$
wxdraw2d( grid = true,  line_type = solid,  line_width = 2, color = blue,
                implicit( (2*y^3+3*y)/6=t , t, -2.0, 2.0, y, -2,2)
             );

Ejemplo 12.3.2

kill(all)$

EDO_2: t^2 *'diff(y, t, 2) - t * 'diff(y, t) + 4*y = 0;

ode2(EDO_2, y, t);

ic2(%, t=1, y=1, 'diff(y,t)=2);

expand(%);

load(draw)$
wxdraw2d( grid = true,  line_type = solid,  line_width = 2, color = blue,
                implicit( y=(t*sin(sqrt(3)*log(t)))/sqrt(3)+t*cos(sqrt(3)*log(t)) , t, 1, 10, y, -12,2)
             );

y(t):=(t*sin(sqrt(3)*log(t)))/sqrt(3)+t*cos(sqrt(3)*log(t));

wxplot2d([y(t)], [t, 1, 10],   [ylabel, ""] , [style, [lines, 2]] ,
[gnuplot_preamble, "set size ratio 1; set grid;"]  , [nticks, 100] )$

Ejemplo 12.3.3

kill(all)$

EDO_3: 'diff(y, t, 2) - (3/t) * 'diff(y, t) + (3/t^2)*y = 2*t - 1;

ode2(EDO_3, y, t);

expand(%);

ic2(%, t=1, y=1, 'diff(y,t)=2);

expand(%);

load(draw)$
wxdraw2d( grid = true,  line_type = solid,  line_width = 2, color = blue,
                implicit( y=t^3*log(t)-t^3/2+t^2+t/2 , t, 1, 2, y, 0,8)
             );

EDO lineales orden 2 (coef constantes)

Ejemplo 12.3.4

kill(all)$

EDO_4:   diff(y(t), t, 2) + 4*y(t) = 12*t;

ode2(EDO_4, y(t), t);

EDO_5:   diff(y(t), t, 2) + 4*y(t) = 0;

ode2(EDO_5, y(t), t);

ic2(  y=%k1*sin(2*t)+%k2*cos(2*t)+3*t , t=0, y=3, diff(y,t)=2);

load(draw)$
wxdraw2d( grid = true,  line_type = solid,  line_width = 2, color = blue,
                implicit( y=-sin(2*t)/2+3*cos(2*t)+3*t , t, 0, 10, y, 0,40)
             );