Matlab
Matlab
6th Edition
ISBN: 9781119299257
Author: Amos Gilat
Publisher: WILEY CONS
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 6, Problem 36P

The roots of a cubic equation a 3 x 3 + a 2 x 2 + a 1 x + a 0 = 0 can be calculated using the following procedure: Set: A=a2/a3, B=a1/ a3, and C= a0/ a3.

Calculate: D =O3+R2,

where Q =(3B-A2)/9 and R(9AB027C-2A3)/54.

If D>0 the equation has complex roots.

If D=0 all roots are real and at least two are equal. The roots are given by:

x 1 = 2 R 3 A / 3 , x 2 = R 3 A / 3 and x 3 = R 3 A / 3 .

If D<0 all roots are real and are given by:

x 1 = 2 Q cos ( θ / 3 ) A / 3 ,

x 2 = 2 Q cos ( θ / 3 + 120 ° ) A / 3 , and x 3 = 2 Q cos ( θ / 3 + 240 ° ) A / 3 ,where

θ = R / Q 3 .

Write a MATLAB program that determines the real roots of a cubic equation. As input the program asks the user to enter the values of a3, a2, a1, and a0as a vector. The program then calculates the value of D. If the equations have complex roots, the message “The equation has complex roots” is displayed. Otherwise the real roots are calculated and displayed. Use the program to solve the following equations:

(a)

5 x 3 + 34.5 x 2 + 36.9 x + 8.8 = 0 (b)

2 x 3 + 10 x 2 + 24 x 15 = 0 (c)

2 x 3 + 1.4 x 2 20.58 x + 30.87 = 0

Blurred answer
Students have asked these similar questions
(c) Because logistic regression predicts probabilities of outcomes, observations used to build a logistic regression model need not be independent. A. false: all observations must be independent B. true C. false: only observations with the same outcome need to be independent I ANSWERED: A. false: all observations must be independent.  (This was marked wrong but I have no idea why. Isn't this a basic assumption of logistic regression)
Business discuss
Spam filters are built on principles similar to those used in logistic regression. We fit a probability that each message is spam or not spam. We have several variables for each email. Here are a few: to_multiple=1 if there are multiple recipients, winner=1 if the word 'winner' appears in the subject line, format=1 if the email is poorly formatted, re_subj=1 if "re" appears in the subject line. A logistic model was fit to a dataset with the following output:   Estimate SE Z Pr(>|Z|) (Intercept) -0.8161 0.086 -9.4895 0 to_multiple -2.5651 0.3052 -8.4047 0 winner 1.5801 0.3156 5.0067 0 format -0.1528 0.1136 -1.3451 0.1786 re_subj -2.8401 0.363 -7.824 0 (a) Write down the model using the coefficients from the model fit.log_odds(spam) = -0.8161 + -2.5651 + to_multiple  + 1.5801 winner + -0.1528 format + -2.8401 re_subj(b) Suppose we have an observation where to_multiple=0, winner=1, format=0, and re_subj=0. What is the predicted probability that this message is spam?…

Chapter 6 Solutions

Matlab

Ch. 6 - The Pascal triangle can be displayed as elements...Ch. 6 - Fibonacci numbers are the numbers in a sequence in...Ch. 6 - The reciprocal Fibonacci constant ?is defined by...Ch. 6 - The value of p can be estimated from:...Ch. 6 - The value of p can be estimated from the...Ch. 6 - Write a program that (a) generates a vector with...Ch. 6 - A vector is given by x= [9 -1.5 13.4 13.3 -2.1 4.6...Ch. 6 - The Pythagorean theorem states that a2+ b2= c2....Ch. 6 - Write a MATLAB program in a script file that finds...Ch. 6 - A safe prime is a prime number that can be written...Ch. 6 - Sexy primes are two prime numbers that the...Ch. 6 - A Mersenne prime is a prime number that is equal...Ch. 6 - A perfect number is a positive integer that is...Ch. 6 - A list of exam scores (S) (in percent out of 100%...Ch. 6 - The Taylor series expansion for axis:...Ch. 6 - Write a MATLAB program in a script file that finds...Ch. 6 - The following are formulas for calculating the...Ch. 6 - Body mass index (BMI) is a measure of obesity. In...Ch. 6 - Write a program in a script file that calculates...Ch. 6 - Write a program that determines the change given...Ch. 6 - The concentration of a drug in the body CPcan be...Ch. 6 - One numerical method for calculating the cubic...Ch. 6 - Write a program in a script file that converts a...Ch. 6 - In a one-dimensional random walk, the position x...Ch. 6 - The Sierpinski triangle can be implemented in...Ch. 6 - The roots of a cubic equation a3x3+a2x2+a1x+a0=0...Ch. 6 - The overall grade in a course is determined from...Ch. 6 - A Keith number is a number (integer) that appears...Ch. 6 - The following MATLAB commands create a sine-shaped...
Knowledge Booster
Background pattern image
Statistics
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, statistics and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Algebra: Structure And Method, Book 1
Algebra
ISBN:9780395977224
Author:Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. Cole
Publisher:McDougal Littell
Text book image
College Algebra
Algebra
ISBN:9781337282291
Author:Ron Larson
Publisher:Cengage Learning
Text book image
Glencoe Algebra 1, Student Edition, 9780079039897...
Algebra
ISBN:9780079039897
Author:Carter
Publisher:McGraw Hill
Text book image
Big Ideas Math A Bridge To Success Algebra 1: Stu...
Algebra
ISBN:9781680331141
Author:HOUGHTON MIFFLIN HARCOURT
Publisher:Houghton Mifflin Harcourt
Text book image
Elementary Algebra
Algebra
ISBN:9780998625713
Author:Lynn Marecek, MaryAnne Anthony-Smith
Publisher:OpenStax - Rice University
Text book image
Functions and Change: A Modeling Approach to Coll...
Algebra
ISBN:9781337111348
Author:Bruce Crauder, Benny Evans, Alan Noell
Publisher:Cengage Learning
What is a Linear Equation in One Variable?; Author: Don't Memorise;https://www.youtube.com/watch?v=lDOYdBgtnjY;License: Standard YouTube License, CC-BY
Linear Equation | Solving Linear Equations | What is Linear Equation in one variable ?; Author: Najam Academy;https://www.youtube.com/watch?v=tHm3X_Ta_iE;License: Standard YouTube License, CC-BY