Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

QUESTION1: Problem 6.19) Figure P6.19 shows a circuit with a resistor, an induct

ID: 2267528 • Letter: Q

Question

QUESTION1: Problem 6.19) Figure P6.19 shows a circuit with a resistor, an inductor, and a capacitor in parallel. Kirchhoft s rules can be used to express the impedance of the system as where Z= impedance (), and co is the angular frequency. Find the co that results in an impedance of 100 using the zero function with initial guesses of l and 1000 for the following parameters: R-225 , C-0.6x10-6F, and L-0.5 H. (a) Using the Newton-Raphson method (x- 1) (b) Using the secant method (x1-1 andx -3). (c) * Using the modified secant method (x.-1.0 = 0.01 *fr practice purpose) FIGURE P6.19

Explanation / Answer

Code:

clear all
clc
%defining function and derivative
error = 10^-7;
R = 225;
C = 0.6*10^-6;
L = 0.5;
Z = 100;
f = @(x) ( ( 1/R^2 ) + (x*C - (1/( x*L ) ) )^2 )^(1/2) - (1/Z);

%this is the derivative of the above function
fp=@(x) ( 1/2 * ( ( 1/R^2 ) + (x*C - (1/( x*L ) ) )^2 )^(-1/2) .*( 2 * (x*C - (1/(x*L) ) ).* ( C + ( 2/(x^2*L) ) ) ) );
% f = @(x) 7*sin(x).*exp(-x)-1;
% fp = @(x) 7*cos(x).*exp(-x) - 7*sin(x).*exp(-x);

%Using fzero
x0 = [1 1000]; % initial interval
x = fzero(f,x0);
fzero_root = x


%NewtonRaphson method
%------------------------
x=1; y=f(x); yp=fp(x);
while norm(y)>error
x=x-f(x)/fp(x);
y=f(x);
end

root_newton = x

%Secant method
%------------------------
a = 1;b = 3;
c = (a*f(b) - b*f(a))/(f(b) - f(a));

while abs(f(c)) > error
a = b;
b = c;
c = (a*f(b) - b*f(a))/(f(b) - f(a));

  
end

root_secant = c

%Modified Secant method
%------------------------
x=1; dx=0.01;
fval1=f(x);
fval2=f(x+dx);

while norm(fval1(end))>error

x(end+1,1)=x(end)-fval1(end)*dx/( fval2(end)-fval1(end) );
fval1(end+1,1)=f(x(end));
fval2(end+1,1)=f(x(end)+dx);
end

root_modified_secant = x(end)

Output:


fzero_root =

220.0202


root_newton =

220.0176


root_secant =

220.0201


root_modified_secant =

220.0202