cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

program - finding the roots of the quadratic equation in subset of real numbers

lsheekan
1-Visitor

program - finding the roots of the quadratic equation in subset of real numbers

Hi all,

i want to write a program in MathCad 15, that can find a roots of the quadratic equation in subset of real numbers. Result will be a vector, or text: "this equation dont have result in real numbers"

I already have a program, that can find a roots:

quad.jpg

but i dont know how to continue..

i think, that if b^2-4*a*c <0 than this  equation dont have results in real numbers. but how can i write this in program?

Thanks a lot!

ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:lsheekan)

3 REPLIES 3
LucMeekes
23-Emerald III
(To:lsheekan)

Does this help?

thank you a lot!

LucMeekes
23-Emerald III
(To:lsheekan)

You're welcome.

Maybe this helps even more:

Now you get either an error message, or just THE (one) result, or a vector with two results, depending on the value of discr.

Luc

Announcements

Top Tags