0% found this document useful (0 votes)
28 views4 pages

Angle and Curvature of Polar Curves

This document discusses using MATLAB to calculate the angle between polar curves and the radius of curvature of polar curves at given points. It includes: 1) Code to calculate the angle between two polar curves r=4(1+cos(t)) and r=5(1-cos(t)) at their intersection point. 2) Code to calculate the angle between r=4cos(t) and r=5sin(t) by plotting the curves and finding their intersection point. 3) Code to calculate the radius of curvature of r=4(1+cos(t)) at t=π/2. 4) Code to calculate the radius of curvature of r=asin(

Uploaded by

srinidhi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views4 pages

Angle and Curvature of Polar Curves

This document discusses using MATLAB to calculate the angle between polar curves and the radius of curvature of polar curves at given points. It includes: 1) Code to calculate the angle between two polar curves r=4(1+cos(t)) and r=5(1-cos(t)) at their intersection point. 2) Code to calculate the angle between r=4cos(t) and r=5sin(t) by plotting the curves and finding their intersection point. 3) Code to calculate the radius of curvature of r=4(1+cos(t)) at t=π/2. 4) Code to calculate the radius of curvature of r=asin(

Uploaded by

srinidhi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Expt.

2 Angle between polar curves curvature and radius curvature


1. Angle between curves
2. Radius of curvature

Functions used

• subs() ; Symbolic substitution


• ezplot(); Easy-to-use function plotter
• simplify(); Algebraic simplification
• atan(); Tan inverse
• vpa(); Variable-precision arithmetic
• solve(); Equations and systems solver

2.0 Appetizer
The function solve() will provide a general solution for symbolic equations. Let us start with roots of quadratic
equations. We shall provide a quadratic equation to matlab and it generates a symbolic values to the roots of
the equation.

Quadratic equations run this code

syms a b c x s
eqn = a*x^2 + b*x + c == 0
s=solve(eqn)

We see it produces symbolic solution to quadratic equation. We can use solve() to generate symbolic
solution. Once the equation is generated, we can pass the values to the equation to get the exact value. We
use subs() to assign the variables to the equation. As shown here

subs(s,[a,b,c],[1,-7,12]) % pass 1,-7,12 for a,b,c for the equation

%%

We can solve the quadratic equations directly too

syms x
roots=solve(x^2 -7*x + 12,x)

2.1 Angle between curves

1
Angle between radius vector and tangent is given by tan φ = r dθ/dr .

If tan φ1 and tan φ2 are angle between radius vector and tangent of two curves then |φ1 − φ2| is the angle
between two curves at the point of intersection.

2.1.1 Find the angle between the curves: r = 4*(1 + cos(t)) and r = 5*(1 − cos(t)).

syms r t %define symbols r and t


r1 = 4 * ( 1 + cos ( t ) ) ; % Input first polar curve
r2 = 5 * ( 1 - cos ( t ) ) ;
dr1 = diff ( r1 , t ) % find the derivative of the function
dr2 = diff ( r2 , t )
t1 = r1 / dr1 % estimate r/{d(r1)/dt}
t2 = r2 / dr2
q = solve ( r1 == r2 , t ) %solve for r1 == r2 ,
% to find the point of intersection between curves
w1=subs(t1,vpa(q(2))); % Evaluate t1 with the value of q(2)
w2=subs(t2,vpa(q(2))); % q(2) has the value at point of intersection
y1 = atan ( w1 ); % find the inverse tan of w1
y2 = atan ( w2 );
w=abs(y1-y2); % diffrence between w1 and w2
fprintf('angle between curves is: %f',w) % display the result

%%

2.1.2 Find the angle between the curves r = 4*cos(t) and r = 5*sin(t)

This program uses ezplot(). Students are encouraged to change it to fplot()

syms r t
r1 = 4 * ( cos ( t ) ) ; % Define two curves
r2 = 5 * ( sin ( t ) ) ;
ezplot(r1)
hold on; ezplot(r2) % plot both the curves
dr1 = diff ( r1 , t ) %differntiate both the curves
dr2 = diff ( r2 , t )
figure() % plot the differentiated curves on a sperate window
ezplot(dr1)
hold on; ezplot(dr2)
t1 = r1 / dr1 % as in the previous example
t2 = r2 / dr2
q = solve ( r1 - r2 , t )
w1=subs(t1,vpa(q(1)));
w2=subs(t2,vpa(q(1)));
y1 = atan ( w1 ); % to find the inverse tan of w1
y2 = atan ( w2 );
w=abs(y1-y2) % you can use printf to print the result

2
2.2 Radius of curvature
Formula to calculate Radius of curvature in polar form is

2.2.1 To find the radius of curvature

r = 4(1 + cos (t)) at t=π/2

syms r t % define symbols r and t


r = 4 * ( 1 + cos ( t ) ); %define thet function
r1 = diff(r,t) % get the first derivative
r2= diff(r1,t) % get the second derivative
rho = (( r^2 + r1^2 )^(3/2)) / ( r^2 + (2 * r1^2) - (r * r2) ) %calculate rho
% expression for rho is given above
rho1 = subs(rho,t,pi/2) ; % estimate rho at pi/2

% convert symbolic varialbe to a number and print it on the screen


fprintf('radius of curvature is %f',vpa(rho1))

2.2.2 Find radius of curvature of r = a*sin(nt) at t = pi/2 and n = 1

syms t r a n
r = a * sin ( n * t ) ;
r1 = diff(r,t) ;
r2= diff(r1,t)
rho = (( r^2 + r1^2 )^(1.5))/ ( r^2 + 2 * r1^2 - r * r2 )
rho1 = subs(rho,t,pi/2)
rho2 = subs(rho1,n,1)
vpa(rho2)

3 Parametric curves
To find the radius of curvature equation is

With ' corresponding to first order and '' as second order differentiation

2.3.1 Find radius curvature of x = a*cos(t), y = a*sin(t) at r=5 and t = pi/2

syms t a x y %Define variables


y = a * sin ( t ) ; %define y as a sine value
x = a * cos ( t ) ; % define x as a cosine value

3
% perform algebraic simplification of the differentited functions
dydx = simplify(diff(y,t))/ simplify(diff(x,t) ) ;
rho = simplify((1 + dydx^2 )^(1.5)/(diff(dydx,t)/(diff(x,t)))) ;
display('radius of curvature:') ; vpa(rho)
% convert symbolic variable to a value using vpa() and display the same
t1 = pi / 2 ; % t=pi/2, as per the given expression
r1 = 5 ; % r= 5, as per the given expression

% Estimate radius of curvarute at 5,pi/2


rho1 = subs(rho,t,t1)
rho2 = subs(rho1,a,r1)

fprintf('Radius of curvature at r=%f and t=pi/2 is %f' ,r1, vpa(rho2))


% display the radius of curvature
curve = 1/rho2 ;
fprintf('Curvature at (%f , pi/2 ) is %f', r1, vpa(curve))

Write a code to estimate radius of curvature of y=a*sin(t)^(3/2) ; x = a*cos(t)^(3/2)

[Link]@[Link]

Common questions

Powered by AI

The angle between two curves, in polar coordinates, can be found using the formula tan φ = r (dθ/dr). For two curves r1 and r2, the angle between them at the intersection point is |φ1 − φ2|, where φ1 and φ2 are the angles between the radius vector and tangent of the curves. For the curves r = 4*(1 + cos(t)) and r = 5*(1 - cos(t)), calculate the derivatives dr1 and dr2 with respect to t. Find t1 = r1/dr1 and t2 = r2/dr2. Solve for points of intersection q = solve(r1 == r2, t). Evaluate t1 and t2 at this point, and determine y1 = atan(w1) and y2 = atan(w2). The angle |y1 − y2| is then the angle between the two curves .

Variable-precision arithmetic (vpa) in MATLAB is used to calculate numeric values with higher precision than default double precision. It is essential in curvature and angle computations where symbolic variables yield results that must be converted to precise numerical values. VPA ensures that these computations maintain accuracy, reducing the error margins in derived values like radius of curvature or intersection angles, crucial for accurate plotting and analysis .

Use MATLAB's ezplot() to plot the curves r = 4*cos(t) and r = 5*sin(t). Define these as symbolic equations and utilize diff to obtain their derivatives. To analyze intersections, solve r1 - r2 = 0 using solve(). Evaluate t1 and t2 at the points of intersection and calculate y1 = atan(w1) and y2 = atan(w2). The difference |y1-y2| indicates the angle between curves at their intersection. This visual and analytical approach provides insights into where and how the curves intersect .

The 'simplify()' function in MATLAB is crucial for reducing complex symbolic expressions to a more manageable form. When finding curvature, the derivatives of parametric equations can be intricate, resulting in expressions that are difficult to interpret directly. Simplify() helps condense these expressions into simpler ones, allowing for clearer calculations and reduced computational errors. The clarified expression is then used to find dydx and further the curvature calculations, demonstrating simplify()'s necessity for accurate and efficient processing .

To find the radius of curvature for the parametric curve x = a*cos(t), y = a*sin(t), first define the variables and perform differentiation. Simplify the derivative dy/dx using dydx = simplify(diff(y,t)) / simplify(diff(x,t)). The radius of curvature ρ = simplify((1 + dydx^2)^(1.5) / (diff(dydx, t) / diff(x,t))). Substitute t=π/2 and r=5 in the equation to estimate the value ρ, using rho1 = subs(rho, t, pi/2) and rho2 = subs(rho1, a, r1) for computations. The result will produce the radius of curvature at the specified point .

To find symbolic solutions to polynomial equations in MATLAB, the solve() function is used. For a quadratic equation of the form ax^2 + bx + c = 0, define symbolic variables using syms. The equation can be coded as eqn = a*x^2 + b*x + c == 0. The solve(eqn) function will generate symbolic roots of the equation. For specific coefficient values, use subs(s, [a, b, c], [1, -7, 12]) to get the exact roots of x^2 - 7x + 12 = 0 .

Begin by defining the parameters y = a*sin(t)^(3/2) and x = a*cos(t)^(3/2) using symbolic variables. Perform differentiations to find dy/dt and dx/dt. Simplify dy/dx with these derivates and apply the radius of curvature formula for parametric equations. Substitute t = π/2 into the final radius formula. Use vpa() to convert symbolic solutions into numerical values, revealing the radius of curvature at the specified point in this potentially intricate mathematical transformation .

The subs() function in MATLAB allows the assignment of specific values to the symbolic variables within an equation, converting general symbolic solutions into specific numeric results. This is particularly useful in cases like finding the roots of quadratic equations or evaluating expressions at specific points. For instance, subs(s, [a, b, c], [1, -7, 12]) changes the symbolic roots of the equation ax^2 + bx + c = 0 to numeric roots of x^2 - 7x + 12 = 0, facilitating precise solution evaluation and application .

The radius of curvature for a polar curve is given by the formula ρ = ((r^2 + (dr/dt)^2)^(3/2)) / (r^2 + 2(dr/dt)^2 - r(d²r/dt²)). For the curve r = 4(1 + cos(t)), at t = π/2, compute the first derivative r1 = diff(r,t) and the second derivative r2 = diff(r1,t). Substitute t = π/2 into the formula to get ρ = ((16 + 0)^(3/2)) / (16 + 2*0 - 4*0), resulting in a radius of curvature of approximately 16 at t = π/2 .

To estimate the angle between r = 4*cos(t) and r = 5*sin(t), use MATLAB to define these curves with symbolic variables. Differentiate both curves with respect to t for their derivatives, dr1 and dr2. Solve for their intersection points using q = solve(r1 == r2, t). Calculate t1 = r1/dr1 and t2 = r2/dr2. Substitute the intersection points to get w1 and w2, and apply y1 = atan(w1) and y2 = atan(w2) to determine the tangential angles. The angle between the curves at their intersection is the absolute difference |y1-y2| .

You might also like