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
ira [324]
3 years ago
8

Write a program that will solve a quadratic equation: ax2 + bx + c = 0. The program must ask the user to enter the values for a,

b and c. It should then determine the discriminant of the parabola and based on the discriminant it should display the real roots: Discriminant = b2 - 4ac > 0 means there will be two distinct real roots. Discriminant = b2 - 4ac = 0 means there will be only one real root. Discriminant = b2 - 4ac < 0 means there will be no real roots. Use the if - then else structure in your program to decide the outcome of the program. User must then use the quadratic equation to solve for x: = − ± √ −
Mathematics
1 answer:
JulsSmile [24]3 years ago
4 0

Answer:

x= -b ±√b²- 4ac/2a

Step-by-step explanation:

ax2 + bx + c = 0

Dividing the quadratic equation by a gives

x2 + b/ax + c/a = 0

x2 + b/ax = - c/a

Applying the square formula

(x)^2 + 2(x) (b/2a) + (b/2a)^2= + (b/2a)^2- c/a

(x+b/2a)^2= b²/4a² - c/a

(x+b/2a)^2= b²/4a² - 4ac/4a²

(x+b/2a)^2= b²- 4ac/4a²

Taking square root of both sides gives

(x+b/2a)= ±√b²- 4ac/2a

x= -b/2a±√b²- 4ac/2a

x= -b ±√b²- 4ac/2a

This is called the quadratic formula and it can solve the value for x for the given value of a, b and c for the quadratic equation.

From this it is concluded that

Discriminant = b2 - 4ac > 0 means there will be two distinct real roots. Discriminant = b2 - 4ac = 0 means there will be only one real root. Discriminant = b2 - 4ac < 0 means there will be no real roots.

This is because a square root of a value greater than 0 is possible and gives two values for roots of x.

The square root of a value less than 0 gives a negative number and therefore the roots are an imaginary number.

The square root of a value greater equal to 0 gives a zero leaving behind only one real root.

You might be interested in
The possible ways to complete a multiple-choice test consisting of 19 questions, with each question having four possible answers
LekaFEV [45]
Let's say there were 3 questions with four answer choices each. That would mean there were 4*4*4 = 16*4 = 64 different ways to answer.

Extend this example out to 19 questions instead of 3. You'll get
4^19 = 4*4*4*...*4*4 = 274,877,906,944
The last value is one big number (not four numbers)
The large number is the answer

note: 4^19 means we have 19 copies of '4' being multiplied together. The three dots mean "continue the pattern". On your paper, you should somehow indicate to your teacher that there are 19 copies of '4' being multiplied.
4 0
3 years ago
Read 2 more answers
a hockey team has 12 girls and 9 boys. Each week the coach chooses the player at random to play goalie for next game what is the
victus00 [196]
It's most likely he's going to choose a girl, because there at 3 more girls then boys, since there's more majority of girls, it's most likely to be a girl. Hope I helped!
5 0
4 years ago
Which of the following formulas would find the surface are of a right cylinder where h is the height, r is the radius, and BA is
xz_007 [3.2K]
A=2πrh+2πr is the formula for cylindrical surface area
8 0
3 years ago
Joel made egg sandwiches and tuna sandwiches in the ratio 2:3. He then made 15 more tuna sandwiches and the ratio changed to 1:3
Aleksandr [31]

Answer:

40 sandwiches

Step-by-step explanation:

egg sandwiches : tuna sandwiches

 2                         : 3

Multiply by x  because we do not know how many sandwiches, just the ratio

2x                       : 3x


Add 15  tuna sandwiches

2x                       : 3x+15

Now the ratio is 1:3


egg sandwiches : tuna sandwiches

 1                         : 3

Multiply by y  because we do not know how many sandwiches, just the ratio

y                           : 3y


Set the number of egg sandwiches equal

2x =y

then set the number of tuna sandwiches equal

3x+15 = 3y

We know have a system of 2 equations and 2 unknowns

Substitute y =2x into the second equation

3x+15 = 3(2x)

Distribute

3x+15 = 6x

Subtract 3x from each side

3x-3x+15 = 6x-3x

15 =3x

Divide by 3

15/3 = 3x/3

5 =x


egg sandwiches : tuna sandwiches

 2                         : 3

Multiply by x  because we do not know how many sandwiches, just the ratio

2x                       : 3x

2*5                        3*5

10                             15


He originally made 10 egg sandwiches and 15 tuna sandwiches

Then he made 15 more tuna sandwiches

The total number of sandwiches he made is

10+15+15 = 40 sandwiches  




5 0
3 years ago
A 12 foot ladder is placed 3 feet from a house and leaned against the house. At what height does the ladder touch the house?
Anettt [7]
The answer will be 12.37 ft. Hope this helps! Mark brainly please!
4 0
3 years ago
Other questions:
  • Three pizzas are shared equally among 12 people. What fraction of a pizza will each person get?
    10·1 answer
  • What is the length of each side?label each side with an expression that represents its length
    13·1 answer
  • the tempretur on friday was 46.8 degrees fahrenhiet. on saturday the tempreture was 63.5 degrees fahrenhiet how much higher was
    11·1 answer
  • PLEASE ANSWER ASAP!!!
    6·1 answer
  • What is the factor of -12n - 20
    6·1 answer
  • 0.77777 as a fraction
    7·1 answer
  • If a+b(c+d)/e =1 which of the variable a,b,c,d, or e cannot be 0?
    13·1 answer
  • <img src="https://tex.z-dn.net/?f=4y%20%5Ctimes%208y" id="TexFormula1" title="4y \times 8y" alt="4y \times 8y" align="absmiddle"
    12·2 answers
  • Pls answer question 9 quickly I will mark as brainliest
    15·2 answers
  • Can someone help me on this. <br> The solution to -45 = n/5 is _____.<br> -9<br> 9<br> 225<br> -225
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!