function res=eqn2(theta)
	[N]=textread("input_outlab_task_A2.txt","%f");
	x0=N(1);
	y0=N(2);
	x1=N(3);
	y1=N(4);
	v2=N(5);
	vl=N(6);
	d=N(7);
	w=N(8);
	n=N(9);
	t1=N(10);
	x1ground=x1;
	y1ground=y1;
	x1=x1ground-x0;				  #   the input reading code lines
	y1=y1ground-y0;               #		with the values x1 , y1 set to the relative values and the originals are stored in the ground suffixed values
	
	res  = ((x1-(w*tan(get_alpha(theta,n))))/(vl*sin(theta))+((w*n)/(vl*cos(get_alpha(theta,n)))))-((((x1-(w*tan(get_alpha(theta,n) ) ) )*cot(theta))-y1+w-(v2*t1))/v2);
		# the above equation is the exact equation for getting the value of theta	
endfunction