# Ejercicio 12.11

kill(all)$

Ecuación diferencial del proceso, hip 1

EDO_a: 'diff(x(t),t)=k*x(t);

ode2(EDO_a, x(t), t);

x(t):=C*%e^(k*t);

Condiciones iniciales: x(0) = 100

x(0)=100;

x(t):=100*%e^(k*t);

Información sobre el proceso: x(50)=200

200 = x(50);

2 = e^(50*k);

log(2)=50*k;

k=k:log(2)/50;

x(t):=100*%e^((log(2)/50)*t) ;

diff(x(t), t);

Dx(t):=2*log(2)*%e^((log(2)*t)/50);

Dx(0);

Ecuación diferencial del proceso, hip 2

EDO_a: 'diff(x1(t),t)=k1*x1(t)*(300-x1(t));

partfrac( 1/(x1*(300-x1)) , x1 );

f1(x1):=1/(300*x1);   integrate(f1(x1), x1);

f2(x1):=1/(300*(300-x1));   integrate(f2(x1), x1);

log(x1(t)/(300-x1(t)))=C2+300*k1*t;

(x1(t)/(300-x1(t)))=C3*exp(300*k1*t);

Eq1: x1(t) = (300-x1(t)) * %e^(300*k1*t)*C3 ;

solve ( [Eq1], x1(t));

x1(t):=(300*%e^(300*k1*t)*C3)/(%e^(300*k1*t)*C3+1);

x1(0) = 100;

Eq2: (300*C3)/(C3+1)=100;   solve ( [Eq2], C3);

x1(t):=(150*%e^(300*k1*t))/(%e^(300*k1*t)*(1/2)+1);

En t=0 el crecimiento inicial coincide por condición objectiva de la población

diff(x1(t),t);

Dx1(t):=(45000*k1*%e^(300*k1*t))/(%e^(300*k1*t)/2+1)-(22500*k1*%e^(600*k1*t))/(%e^(300*k1*t)/2+1)^2;

Dx1(0);

Eq3: 20000*k1=2*log(2);
solve([Eq3], k1);

x1(t):=(150*%e^(300*(log(2)/10000)*t))/(%e^(300*(log(2)/10000)*t)*1/2+1) ;

x1(t), numer;

wxplot2d([x1(t)], [t,0,100], [y, 0, 300] , [ylabel, ""] , [legend, "x1(t)"] , [style, [lines, 2]] ,
 [gnuplot_preamble, "set grid; set zeroaxis;"])$

(150*%e^(0.020794415416798*t)) = 200*(0.5*%e^(0.020794415416798*t)+1) ;

expand(%);

Eq4 : log(4)=0.020794415416798*t;
solve( [Eq4] , t), numer;