my code is
clear all;
clc;
close all;
% Define the symbolic variable t
syms t ;
t1 =0.39;
alpha1 =0.22; alpha2 = 0.135; alpha3 =0.05;
g=9.8;
w=sqrt(g/alpha1);
Tau=1.25;
L1=(alpha3*t1*w)/(w*t1+tanh(w*(Tau/2-t1)));
L2=(alpha2*t1*w*tanh(w*(Tau/2-t1)))/(1+(w*t1)+tanh(w*(Tau/2-t1)));
%if t>=0 && t<t1
f1=(L1/t1)*t;
f1dot=L1/t1;
f2=(L2/t1)*t;
f2dot=L2/t1;
f1x=(-g/(2*alpha1))*(f1 + f2)^2 +(1/2)*(f1dot + f2dot)^2;
f2y=(-g/(2*alpha1))*(-f1 + f2)^2 +(1/2)*(-f1dot + f2dot)^2;
F1xy=sqrt(f1x.^2+f2y.^2);
g1=int(F1xy,t)
hold on
fplot(g1, [0, t1]);
%elseif t>t1 && t<=(Tau-t1)
f3=((alpha3/Tau)*(t-(Tau/2)))+((2*alpha3*Tau^2*w^2)/(pi*(Tau^2*w^2+4*pi^2)))*sin((2*pi*t)/Tau);
f4=((4*alpha2*Tau^2*w^2)/(pi*(Tau^2*w^2+pi^2)))*sin(pi*t/Tau);
%%%%%%%%%%
f3dot=(alpha3/Tau)+((2*alpha3*Tau^2*w^2)/(pi*(Tau^2*w^2+4*pi^2)))*(2*pi/Tau)*cos(2*pi*t/Tau);
f4dot=((4*alpha2*Tau^2*w^2)/(pi*(Tau^2*w^2+pi^2)))*(pi/Tau)*cos(pi*t/Tau);
f3x=(-g/(2*alpha1))*(f3 + f4)^2 +(1/2)*(f3dot + f4dot)^2;
f3y=(-g/(2*alpha1))*(-f3 + f4)^2 +(1/2)*(-f3dot + f4dot)^2;
%
F2xy=sqrt(f3x.^2+f3y.^2);
g2=int(F2xy,t)
fplot(g2, [t1, Tau-t1]);
%elseif t>=(T-ts) && t<=T
f5=(2*alpha3-L1)+(L1/t1)*(t-(Tau-t1));
f5dot=(L1/t1);
f6=(L2/t1)*(Tau-t);
f6dot=-(L2/t1);
f3x=(-g/(2*alpha1))*(f5 + f6)^2 +(1/2)*(f5dot +f6dot)^2;
f3y=(-g/(2*alpha1))*(-f5 + f6)^2 +(1/2)*(-f5dot + f6dot)^2;
%
F3xy=sqrt(f3x.^2+f3y.^2);
g3=int(F3xy,t)
fplot(g3, [Tau-t1,Tau]);
hold off