subject
Engineering, 25.04.2020 05:06 Savannahh8503

Write a Matlab program that finds numerically all the roots (or the zeros) of the algebraic equation below in the interval 1.0 <=x<=3.0: sqrt(log(x^2+1))=x^2*sin(e^x)+2Part a) Prompt the user to enter a positive integer number n, defined the range 2<=n<=15, and then verify if the number entered lies within the specifications. Your program must allow the user to reenter the number without the need to rerun the program. Part b) Create a user-defined function for the bisection method(see details below). Inside the user-defined function, use the built-in Matlab inline function command (see Lecture Part #3 on Blackboard) to define a function (f(x)) corresponding to the difference between the two sides of the above algebraic equation:f(x)=sqrt(log(x^2+1)) -x^2*sin(e^x)-2Part c) Determine ALL the roots(or zeros) of the above-defined equation using the BISECTION METHOD (see details below)with a precision better than 10-n, where n is the number provided by the user by searching the roots using the bisection function in the interval [1,3] at interval steps of 0.2.Part d) A plot displaying the function corresponding to the difference between the two sides of the above-defined algebraic equation. The x-axis MUST be defined in the range [1,3 ]and the plot MUST have 1000 evenly spaced points. Label the x-axis and y-axis and add a title to the plot. Display inside the function plot all the roots determined from the bisection method. THE BISECTION METHOD: approximates a root of a function (named f(x)) on an interval containing the root. Assume that xL and xR is an interval [xL, xR] where the function has one root. Assume also that function f(x)is continuous in the interval. If the interval is bisected by computing its midpoint, xM, XM=(XL+XR)/2then, three possible situations may occur:1.f(xM)=0, then xM is the root of the function;2.the root is in the left half of the interval [xL, xM];3.the root is in the right half of the interval [xM, xR];f f(xM)≠ 0, then the interval (left half or right half) where the root is located is bisected again. This process is repeated until |f(xM)|<10-n, returning as the root of the function the last calculated xM.

ansver
Answers: 1

Another question on Engineering

question
Engineering, 03.07.2019 14:10
Explain the difference laminar and turbulent flow. explain it with the shear stress and the velocity profiles.
Answers: 1
question
Engineering, 03.07.2019 15:10
Heat is added to a piston-cylinder device filled with 2 kg of air to raise its temperature 400 c from an initial temperature of t1 27 cand pressure of pi 1 mpa. the process is isobaric process. find a)-the final pressure p2 b)-the heat transfer to the air.
Answers: 1
question
Engineering, 04.07.2019 18:10
Asingle-geared blanking press has a stroke of 200 mm and a rated capacity of 320 kn. a cam driven ram is assumed to be capable of delivering the full press load at constant force during the last 15 percent of a constant-velocity stroke. the camshaft has an average speed of 90 rev/min and is geared to the flywheel shaft at a 6: 1 ratio. the total work done is to include an allowance of 16 percent for friction a) estimate the maximum energy fluctuation b) find the rim weight for an effective diameter of 1.2 m and a coefficient of speed fluctuation of 0.10
Answers: 1
question
Engineering, 04.07.2019 18:10
Aturning operation is performed with following conditions: rake angle of 12°, a feed of 0.35 mm/rev, and a depth of cut of 1.1 mm. the work piece is aluminum alloy 6061 with t6 heat treatment (a16061-t6). the resultant chip thickness was measured to be 1.0 mm. estimate the cutting force, fc. use shear stress of 207 mpa and coefficient of friction on the tool face of 0.6.
Answers: 1
You know the right answer?
Write a Matlab program that finds numerically all the roots (or the zeros) of the algebraic equation...
Questions
question
Mathematics, 17.12.2021 02:50
question
Mathematics, 17.12.2021 02:50
question
History, 17.12.2021 02:50
question
Physics, 17.12.2021 02:50
Questions on the website: 13722361