//Initilization of variables w=196 //N/m M_app=4000 //N.m L=6 //m //Calculations //Taking Moment about Point L and equating it to 0 R_r=(M_app+w*L*L*0.5)/(3*L) //N //Taking Moment about Point R and equating it to 0 R_l= ((((2*L)+(L/2))*(w*L))-(M_app))/(3*L) //N //finding point of zero shear a=R_l/w //defining x x0=[0,18] x=[0,0.5,1,1.5,2,2.5,3,3.5,a,4,4.5,5,5.5,6] //for 0