%% FN2
clc, clear all, syms t, x1=exp(-3*t); dx=diff(x1,t); isequal(dx,-3*x1)
x2=-10*exp(-3*t); dx=diff(x2,t); isequal(dx,-3*x2)
%% FN3
clc, clear all, syms t, x1=exp(-3*t); x2=-10*exp(-3*t); x0=1; 
x0_1=double(subs(x1,t,0)); x0_2=double(subs(x2,t,0)); 
isequal(x0,x0_1), isequal(x0,x0_2)
%% FN4
clc, clear all, syms x(t), dx=diff(x); dsolve(dx+2*x, x(0)==1)
%% FN5
clc, clear all, close all, syms t t1, x0=1; k=5; t0=0; u=2; t2=0:0.01:2; 
x_x0=exp(-k*t)*x0; x_u=exp(-k*t)*int(exp(k*t1)*u,t0,t);
x_x0_t=double(subs(x_x0,t,t2)); x_u_t=double(subs(x_u,t,t2));
hold on, plot(t2,x_x0_t), plot(t2,x_u_t), plot(t2,x_u_t+x_x0_t)
%% FN6
clc, clear all, close all, syms x(t) t
Dx=diff(x); D2x=diff(x,2); ODE=D2x-2*Dx-3*x; 
subs(ODE, x, exp(-t)), subs(ODE, x, exp(3*t))
%% FN7
clc, clear all, close all, syms x(t) t; Dx=diff(x); D2x=diff(x,2); 
ODE=D2x-2*Dx-3*x; subs(ODE, x, exp(3*t)+exp(-t))
%% FN9
clc, clear all, close all, syms t, x1=exp(3*t); x2=exp(-t); 
Dx1=diff(x1); Dx2=diff(x2);  W=[x1, x2; Dx1, Dx2], det(W)
