Question

Image for 6.4 Consider the following function: 3x^4 - 6x =6 a. Put the function in standard form, and plot the funct

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

Program Screenshot:

Sample Output:

Code to copy:

clear all; close all; clc
% a.Solution
num = -5:0.01:5;
fn = @(x) 3*(x.^4)-6.*x-6;
figure; plot(num,fn(num));
title('Part (a) Plot of y = 3x^4-6x-6');
xlabel('x'); ylabel('y');

% b.Solution
% Bisection method
disp('f(a)<0 and f(b)>0 or f(a)>0 and f(b)<0');
a = input('Enter the value of a :');
b = input('Enter the value of b :');
TL = 0.01;
MAX = 500;
N = 1;
while(N <= MAX)
re = (a+b)/2;
if (fn(re) == 0 || (b-a)/2 < TL)
fprintf('%.4f is a root of the equation \n',re);
break;
end
N = N+1;
if (fn(re)*fn(a) > 0)
a = re;
else
b = re;
end
end

% c.Solution
%represents the polynomial coefficients as a row vector
pc=[3 0 0 -6 -6];
r=roots(pc);
disp('The roots of the equation are: ');
disp(r);

-------------------------------------------------------------------------------------------------------------------------

d.

Check the result using Excel Goal Seek Tool

Procedure:

1. Open Excel worksheet.

2. Enter x in cell B3 and y in cell C3.

3. In the cell C4, enter the formula (=3*POWER(C4,4)-6*B4-6) as shown in the below excel sheet.

  1. Click on the Data menu and then click What-If Analysis, and then select Goal Seek option.
  2. In the Set cell box (C4), enter the reference for the cell that contains the formula.
  3. In the To value box, type the formula result that you want. In our case, this is 0.
  4. In the By changing cell box, enter the reference for the cell that contains the value that you want to adjust. In our case, this reference is cell B4.
  5. Goal Seek operation leads to the root whose value is closest to the value in cell B4.

Hence, enter the value in cell B4 appropriately to obtain the roots.

Add a comment
Know the answer?
Add Answer to:
6.4 Consider the following function:3x^4 - 6x =6a. Put the function in standard form, and 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
  • In MATLAB please Consider the nonlinear function: y = f(x) = x3 cos x a. Plot...

    In MATLAB please 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 plot mark all the locations of x where y = 0. Make sure to get all the roots in this range. You may need to zoom in to some areas of the plot. These locations are some of the roots of the above equation. b. Use the fzero...

  • Homework 4 - False Position Find the zeros of the function f(x) within the interval (-4,...

    Homework 4 - False Position Find the zeros of the function f(x) within the interval (-4, 6) using the False Position method with f(-4) > 0 what you must know before you start working on the homework: f(-1) <0 f(x) = sin(21(x/5) + exp(x/5) f(+6) > 0 (a) Write a Matlab function that computes the values for f(x) when xis given as an input. (b) Write a Matlab script entitled "myplot.m” that plots the functions f(x) within the interval (-4,...

  • 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,...

  • Function driver and script file please 4) The polynomial f (x)-0.0074x*-0.284x3+ 3.355x2 12.183x +5 has a...

    Function driver and script file please 4) The polynomial f (x)-0.0074x*-0.284x3+ 3.355x2 12.183x +5 has a real root between 15 and 20. Apply the Newton-Raphson method to this function using an initial guess of xo-16.15. Explain your results. 5) Use the roots MATLAB function to find the roots of the polynomial x x-1-0. Compare your answer to the answer you derived in in question 1. 6) Write the following set of equations below in matrix form. Use MATLAB to solve...

  • 1) (80pts) Consider the following function f(x)--x5-4x4 + 2x3 + x2-3x + 5 Develop a simple program which will give an iterative solution to the problem f(x)=0 by Newton's algorithm. The solut...

    1) (80pts) Consider the following function f(x)--x5-4x4 + 2x3 + x2-3x + 5 Develop a simple program which will give an iterative solution to the problem f(x)=0 by Newton's algorithm. The solution should display the results on an Excel spreadsheet such as the one given below (the example below is given for a different function). Choose the programming language which suits you most, however the program should be able to read data from an Excel spreadsheet and write the successive...

  • 4 Consider the transfer function 180 G(s) = s2+0.6s+9 Hint: this problem considers a pair of comp...

    4 Consider the transfer function 180 G(s) = s2+0.6s+9 Hint: this problem considers a pair of complex conjugate poles. Use the steps presented in class for complex poles. Put G(s) in the standard form for Bode plots. Find the initial constant magnitude. Sketch the full Bode plot (both magnitude and phase plots) for G(s). Hint: You can check your answer using the bode (sys) command in MATLAB, where sys G(s). 4 Consider the transfer function 180 G(s) = s2+0.6s+9 Hint:...

  • i BOX Number- " Parts reference Text CommentsHeader&Footer Links MATLAB Lab 8 This exercise was done previously for a full circle. Perform all the steps shown including the plot, but only...

    i BOX Number- " Parts reference Text CommentsHeader&Footer Links MATLAB Lab 8 This exercise was done previously for a full circle. Perform all the steps shown including the plot, but only for the function shown in part b). Objective: In calculus, integration allows us to find the area under a curve. Numerical methods exist which enable us to approximate the area An interesting approach is to randomly select points in an x-y plane and find the fraction of those points...

  • 4. Consider the following partial information about a function f(x): S.x2, 0<x<I, (2-x), 1<x<2. Given that...

    4. Consider the following partial information about a function f(x): S.x2, 0<x<I, (2-x), 1<x<2. Given that the function can be extended and modelled as a Fourier cosine-series: (a) Sketch this extended function in the interval that satisfies: x <4 (b) State the minimum period of this extended function. (C) The general Fourier series is defined as follows: [1 marks] [1 marks] F(x) = 4 + ] Ancos ("E") + ] B, sin("E") [1 marks] State the value of L. (d)...

  • Develop an HTML form that could be used to enter your book information (Books, Authors, and...

    Develop an HTML form that could be used to enter your book information (Books, Authors, and Publishers) start with the HTML/JavaScript template provided Expand upon it! What field information would you enter into a system? Have your form use more then just character text fields ... radio buttons, pick lists, and other elements make your form easier to use and you don't need to do lots of JavaScript checks. What fields would be mandatory ... which could be left blank?...

  • Mountain Paths (Part 1) Objectives 2d arrays Store Use Nested Loops Parallel data structures (i.e...

    Mountain Paths (Part 1) in C++ Objectives 2d arrays Store Use Nested Loops Parallel data structures (i.e. parallel arrays … called multiple arrays in the zyBook) Transform data Read from files Write to files structs Code Requirements Start with this code: mtnpathstart.zip Do not modify the function signatures provided. Do not #include or #include Program Flow Read the data into a 2D array Find min and max elevation to correspond to darkest and brightest color, respectively Compute the shade of...

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