clear;clc;
syms t2
% t2 = 0:0.000000001:0.0001;

R1 = 75;
R2 = 2600;

C1 = 0.25e-6;
C2 = 2.5e-9;

n = 10;

a = (n/(R1*C1))+(1/(R1*C2))+(n/(R2*C1));
b = (n/(R1*R2*C1*C2));
k = R1*C2;

alpha1 = (a/2) - sqrt((a/2)^2 - b);
alpha2 = (a/2) + sqrt((a/2)^2 - b);

tmax = log(alpha2/alpha1)/(alpha2-alpha1);

%to find t2 , V0(t2)=0.5V(tmax)

%plot(t2,(n/k)*(1/(alpha2-alpha1))*(exp(-alpha1*t2)-exp(-alpha2*t2)))

Vmax = (n/k)*(1/(alpha2-alpha1))*(exp(-alpha1*tmax)-exp(-alpha2*tmax));
Vhalf = 0.5*Vmax;

Equ = Vhalf == (n/k)*(1/(alpha2-alpha1))*(exp(-alpha1*t2)-exp(-alpha2*t2));
vpasolve(Equ,t2,[tmax,1])