i) Angle between radius vector and tangent vector
Algorithm:
· For a given curve $$r=f(\theta)$$, find $$\phi=cot^-1(\frac{r'}{r})$$
clear
clc
close
syms theta
%Get the curve
r1=input("Enter
the first curve r1(theta): r1=");
%Find phi1
phi1=simplify(acot(diff(r1)/r1));
%display phi1
fprintf("\n
Angle between radius vector and tangent vector to the curve %s:\n phi= %s",r1,phi1)
Output
Enter the first curve r1(theta): r1=2*(1+cos(theta))
Angle between radius vector and tangent vector to the curve
2*cos(theta) + 2:
phi1=
-acot(sin(theta)/(cos(theta) + 1))
ii)
Angle of intersection between two polar curves
Algorithm:
· For a given curve $$r_1=f_1(\theta)$$ and $$r_2=f_2(\theta)$$ find, $$\phi=cot^{-1}(\frac{r'}{r})$$
where $$r'=dr/d\theta$$
·
Solve given curves for theta value
· Get the required appropriate theta value from the solution
·
Find $$|\phi_2-\phi_1|$$ by substituting obtained
clear
clc
close
syms theta
%Get the two curves
r1=input("Enter
the first curve r1(theta): r1=");
r2=input("Enter
the second curve r2(theta): r2=");
%Find phi1 and phi2
phi1=simplify(acot(diff(r1)/r1));
phi2=simplify(acot(diff(r2)/r2));
%display phi1 and phi2
fprintf("\n
Angle between radius vector and tangent vector to the curve %s:\n phi1=
%s",r1,phi1)
fprintf("\n
Angle between radius vector and tangent vector to the curve %s:\n phi2=
%s",r2,phi2)
%Find t(point of
intersection)
fprintf('\n
The values of theta at the point of intersection are: ')
S=solve(r1==r2,theta,'Real',true)
%Get the theta
tt=input("\n
Choose the value of theta: ");
%Calculate the angle
between the given curves
ang1= abs(vpa(subs(phi1-phi2,
{theta},{tt})));
ang2=vpa(pi-ang1);
fprintf('\n
Angle between given polar curves = %f or %f \n', ang1, ang2);
Output
Enter the first curve
r1(theta): r1=2*(1+cos(theta))
Enter the second curve
r2(theta): r2=2*(1-cos(theta))
Angle between radius vector
and tangent vector to the curve 2*cos(theta) + 2:
phi1=
-acot(sin(theta)/(cos(theta) + 1))
Angle between radius vector
and tangent vector to the curve 2 - 2*cos(theta):
phi2=
-acot(sin(theta)/(cos(theta) - 1))
The values of theta at the
point of intersection are: S =
pi/2
Choose the value of theta:
pi/2
Angle between given polar
curves = 1.570796 or 1.570796
No comments:
Post a Comment