Question: Hello, i want to ask can we convert matlab code to maple code, below is the code and the output stated, can someone help me please

clc;clear;
% Define i1(t) and i2(t) as symbolic variable
syms i1(t) i2(t)

% Given differential equation
ode1 = diff(i1) == 0.5*i1 + -3*i2 +5*exp(-2*t);
ode2 = diff(i2) == 2*i1 - 6*i2;
odes = [ode1; ode2];

% Define initial conditions
cond1 = i1(0) == 1;
cond2 = i2(0) == -1;
conds = [cond1; cond2];

% Solution of system of differential equation
[i1(t), i2(t)] = dsolve(odes,conds)

fplot(i1(t))
hold on
fplot(i2(t))
legend('i1(t)','i2(t)')

Output:

i1(t) =
exp((t*(73^(1/2) - 11))/4)*(73^(1/2)/8 + 13/8)*((57*73^(1/2))/292 - exp((3*t)/4 - (73^(1/2)*t)/4)*((15*73^(1/2))/292 + 5/4) + 3/4) - exp(-(t*(73^(1/2) + 11))/4)*(73^(1/2)/8 - 13/8)*(exp((3*t)/4 + (73^(1/2)*t)/4)*((15*73^(1/2))/292 - 5/4) + (3*73^(1/2)*(73^(1/2) - 19))/292)


i2(t) =
exp(-(t*(73^(1/2) + 11))/4)*(exp((3*t)/4 + (73^(1/2)*t)/4)*((15*73^(1/2))/292 - 5/4) + (3*73^(1/2)*(73^(1/2) - 19))/292) + exp((t*(73^(1/2) - 11))/4)*((57*73^(1/2))/292 - exp((3*t)/4 - (73^(1/2)*t)/4)*((15*73^(1/2))/292 + 5/4) + 3/4)

Please Wait...