1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nadya [2.5K]
3 years ago
9

Unit for trigonometric functions is always "radian". 1. 10 points: Do NOT submit your MATLAB code for this problem (a) Given f(x

)=('-sinx-0.2, find the solutions of f(x)=0 within the interval of 0
Engineering
1 answer:
RoseWind [281]3 years ago
7 0

Answer:

Below is the required code.

Explanation:

%% Newton Raphson Method

clear all;

clc;

x0=input('Initial guess:\n');

x=x0;

f=exp(-x)-sin(x)-0.2;

g=-exp(-x)-cos(x);

ep=10;

i=0;

cc=input('Condition of convergence:\n');

while ep>=cc

i=i+1;

temp=x;

x=x-(f/g);

f=exp(-x)-sin(x)-0.2;

g=-exp(-x)-cos(x);

ep=abs(x-temp);

fprintf('x = %6f and error = %6f at iteration = %2f \n',x,ep,i);

end

fprintf('The solution x = %6f \n',x);

%% End of MATLAB Program

Command Window:

(a) First Root:

Initial guess:

1.5

Condition of convergence:

0.01

x = -1.815662 and error = 3.315662 at iteration = 1.000000

x = -0.644115 and error = 1.171547 at iteration = 2.000000

x = 0.208270 and error = 0.852385 at iteration = 3.000000

x = 0.434602 and error = 0.226332 at iteration = 4.000000

x = 0.451631 and error = 0.017029 at iteration = 5.000000

x = 0.451732 and error = 0.000101 at iteration = 6.000000

The solution x = 0.451732

>>

Second Root:

Initial guess:

3.5

Condition of convergence:

0.01

x = 3.300299 and error = 0.199701 at iteration = 1.000000

x = 3.305650 and error = 0.005351 at iteration = 2.000000

The solution x = 3.305650

>>

(b) Guess x=0.5:

Initial guess:

0.5

Condition of convergence:

0.01

x = 0.450883 and error = 0.049117 at iteration = 1.000000

x = 0.451732 and error = 0.000849 at iteration = 2.000000

The solution x = 0.451732

>>

Guess x=1.75:

Initial guess:

1.75

Condition of convergence:

0.01

x = 227.641471 and error = 225.891471 at iteration = 1.000000

x = 218.000998 and error = 9.640473 at iteration = 2.000000

x = 215.771507 and error = 2.229491 at iteration = 3.000000

x = 217.692636 and error = 1.921130 at iteration = 4.000000

x = 216.703197 and error = 0.989439 at iteration = 5.000000

x = 216.970438 and error = 0.267241 at iteration = 6.000000

x = 216.971251 and error = 0.000813 at iteration = 7.000000

The solution x = 216.971251

>>

Guess x=3.0:

Initial guess:

3

Condition of convergence:

0.01

x = 3.309861 and error = 0.309861 at iteration = 1.000000

x = 3.305651 and error = 0.004210 at iteration = 2.000000

The solution x = 3.305651

>>

Guess x=4.7:

Initial guess:

4.7

Condition of convergence:

0.01

x = -1.916100 and error = 1.051861 at iteration = 240.000000

x = -0.748896 and error = 1.167204 at iteration = 241.000000

x = 0.162730 and error = 0.911626 at iteration = 242.000000

x = 0.428332 and error = 0.265602 at iteration = 243.000000

x = 0.451545 and error = 0.023212 at iteration = 244.000000

x = 0.451732 and error = 0.000187 at iteration = 245.000000

The solution x = 0.451732

>>

Explanation:

The two solutions are x =0.451732 and 3.305651 within the range 0 < x< 5.

The initial guess x = 1.75 fails to determine the solution as it's not in the range. So the solution turns to unstable with initial guess x = 1.75.

You might be interested in
What are flip flops and what do they look like
Vinil7 [7]
flip flops are shoes and they look like shoes
4 0
3 years ago
Read 2 more answers
Select the correct answer.
Ulleksa [173]
The answer is A. Immediately inform her colleague
4 0
3 years ago
What is an advantage of a nuclear-fission reactor?.
Kobotan [32]

Answer:

Nuclear fission is almost 8,000 times more efficient than traditional fossil fuels at producing energy. That's a lot of energy packed into a small space. Nuclear energy is more efficient, which means it uses less fuel to power the plant and produces less waste.


advantages:
-produces no polluting gases
-does not contribute to global warming
-very low fuel costs
-Low fuel quantity reduces mining and transportation effects on environment
-High technology research required benefits other industries
-Power station has very long lifetime

Disadvantages:
-Waste is radioactive and safe disposal is very difficult and expensive
-Local thermal pollution from wastewater affects marine life
-Large-scale accidents can be catastrophic
-Public perception of nuclear power is negative
-Costs of building and safely decommissioning are very high
-Cannot react quickly to changes in electricity demand

4 0
2 years ago
Which one of the following activities is not an example of incident coordination
Lady bird [3.3K]
Directing, ordering, or controlling
7 0
4 years ago
Write torsion equation and explain the importance of each components.<br>​
Elanso [62]
The equations are based on the following assumptions

1) The bar is straight and of uniform section
2) The material of the bar is has uniform properties.
3) The only loading is the applied torque which is applied normal to the axis of the bar.
4) The bar is stressed within its elastic limit.

Nomenclature

T = torque (Nm)
l = length of bar (m)
J = Polar moment of inertia.(Circular Sections) ( m^4)
J' = Polar moment of inertia.(Non circluar sections) ( m^4 )
K = Factor replacing J for non-circular sections.( m^4)
r = radial distance of point from center of section (m)
ro = radius of section OD (m)
τ = shear stress (N/m^2)
G Modulus of rigidity (N/m^2)
θ = angle of twist (radians)

4 0
3 years ago
Other questions:
  • Who tryna play fortnite with me
    11·2 answers
  • Interlocking stacked material is done by​ _____.
    10·2 answers
  • Anything you want to do in Hootsuite can be found in the ________, with the main workspace in the _________?
    15·1 answer
  • Determine the slopes and deflections at points B and C for the beam shown below by the moment-area method. E=constant=70Gpa I=50
    10·1 answer
  • GMA MIG weiding is a
    7·1 answer
  • The two major forces opposing the motion of a vehicle moving on a level road are the rolling resistance of the tires, Fr, and th
    7·1 answer
  • The first step of the Engineering Design Process is to select the
    5·1 answer
  • A coil having a resistance of 10 ohms and an inductance of 4 H is switched across a 20W dc source. Calculate (a) time required b
    9·1 answer
  • What classes do you have to take in college for be a system software engineer
    14·1 answer
  • Which type of line is represented by thin, short dashes?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!