Question

Consider the nonlinear function: y = f(x) = x3 cos x a. Plot y as a function of x as x is varied between -67 and 67. In this

In MATLAB please

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1 $ Consider the non-linear function clc; clear; a) Plot y asfunction of x = –6*pi():0.5:6*pi) 3 y = x.-3. fcos (x); plot (x,

Command window The roots are: -17.2.788 -14 13 72 -10.9956 --7: 8540 -4.7124 -1.5708 1.5708 4.7124 7.8540 10.9956 14.13 72 17

a and b are solved.

Add a comment
Know the answer?
Add Answer to:
In MATLAB please Consider the nonlinear function: y = f(x) = x3 cos x a. Plot...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • please show answer in full with explanation, also show matlab 1. Consider the function f(x)2.753 +18r2 21 12 a) Plot...

    please show answer in full with explanation, also show matlab 1. Consider the function f(x)2.753 +18r2 21 12 a) Plot the graph of f(x) in MATLAB and find all the roots of the function f(x) graphically. Provide the code and the plot you obtained. b) Compute by hand the first root of the function with the bisection method, on the interval -1; 0) for a stopping criterion of 1% c) How many iterations on the interval -1, 0 are needed...

  • Only the matlab nlinear equations x 0.75 Determine the roots of these equations using: a) The...

    Only the matlab nlinear equations x 0.75 Determine the roots of these equations using: a) The Fixed-point iteration method. b) The Newton Raphson method. Employ initial guesses of x y 1.2 and perform the iterations until E.<10%. Note: You can use to solve the problems, but you should sol at least two full iterations manually. AB bl Du Thursd 30/3/ 1. For the displacement in Q3 y 10 e cos at 0 St S 4. a) Plot the displacement y...

  • Please MATLAB for all coding with good commenting. (20) Consider the function f(x) = e* -...

    Please MATLAB for all coding with good commenting. (20) Consider the function f(x) = e* - 3x. Using only and exactly the four points on the graph off with x-coordinates -1,0, 1 and 2, use MATLAB's polyfit function to determine a 3' degree polynomial that approximates f on the interval (-1, 2]. Plot the function f(x) and the 360 degree polynomial you have determined on the same set of axes. f must be blue and have a dashed line style,...

  • Using MATLAB and bisection Find the first 10 roots of the function y(x) = cos(5x). Note...

    Using MATLAB and bisection Find the first 10 roots of the function y(x) = cos(5x). Note you will need to have a script file that steps along the x-axis and calls bisect when a root bracket is found.

  • ____________ % This function is a modified versio of the newtmult function obtained % from % “Ap...

    ____________ % This function is a modified versio of the newtmult function obtained % from % “Applied Numerical Methods with MATLAB, Chapra, % 3rd edition, 2012, McGraw-Hill.” function [x,f,ea,iter]=newtmult(func,x0,es,maxit,varargin) % newtmult: Newton-Raphson root zeroes nonlinear systems % [x,f,ea,iter]=newtmult(f,J,x0,es,maxit,p1,p2,...): % uses the Newton-Raphson method to find the roots of % a system of nonlinear equations % input: % f = the passed function % J = the passed jacobian % x0 = initial guess % es = desired percent relative error...

  • 1. This question concerns finding the roots of the scalar non-linear function f(x) = r2-1-sinx (1...

    1. This question concerns finding the roots of the scalar non-linear function f(x) = r2-1-sinx (1 mark) (b) Apply two iterations of the bisection method to f(x) 0 to find the positive root. (3 marks) (c) Apply two iterations of the Newton-Raphson method to find the positive root. Choose (3 marks) (d) Use the Newton-Raphson method and Matlab to find the positive root to 15 significant (3 marks) (a) Use Matlab to obtain a graph of the function that shows...

  • i need the answer to be on a MatLab window 1. Consider the following equation, which...

    i need the answer to be on a MatLab window 1. Consider the following equation, which represents the concentration (c, in mg/ml) of a drug in the bloodstream over time (t, in seconds). Assume we are interested in a concentration of c2 mg/ml C3te-0.4t A. Estimate the times at which the concentration is 2 mg/ml using a graphical method Be sure to show your plot(s). Hint: There are 2 real solutions B. Use MATLAB to apply the secant method (e.g....

  • Write a Matlab function for: 1. Root Finding: Calculate the root of the equation f(x)=x^3 −5x^2...

    Write a Matlab function for: 1. Root Finding: Calculate the root of the equation f(x)=x^3 −5x^2 +3x−7 Calculate the accuracy of the solution to 1 × 10−10. Find the number of iterations required to achieve this accuracy. Compute the root of the equation with the bisection method. Your program should output the following lines: • Bisection Method: Method converged to root X after Y iterations with a relative error of Z.

  • Solve these nonlinear equations with fsolve function in Matlab. Verify your result with ezplot function. f(x7,x)=...

    Solve these nonlinear equations with fsolve function in Matlab. Verify your result with ezplot function. f(x7,x)= x; - 4x} - x,x2 fz(x, , x)= 2x, – x3 – 3x,X,

  • Problem Two: (Based on Chapra, Problems 12.9 Consider the simultaneous nonlinear equations: 2-5-y y+i- 1. Plot...

    Problem Two: (Based on Chapra, Problems 12.9 Consider the simultaneous nonlinear equations: 2-5-y y+i- 1. Plot the equations and identify the solution graphically. Page 1 of 2 2. Solve the system of equations using successive substitution, starting with the initial guess xo-y-1.5. Show two complete iterations. Evaluate &s for the second iteration. 3. Redo Part 2 using Newton-Raphson method . Automate the solutions in Parts 2 and 3 using MATLAB scripts 5. Solve the system of nonlinear equations by calling...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT