Tuesday, May 7, 2024
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 536  / 2 Years ago, wed, may 11, 2022, 3:39:46

I want good scientific calculator which can calculate the roots of any quadratic equation just by entering the quadratic equation



first of all is any app like those there in ubuntu software centre??


More From » software-recommendation

 Answers
6

It's very simple in octave, just by entering the coefficients of the equation into the roots function



octave:1> roots([1,0,-1])
ans =

-1
1


See the online help



octave:2> help roots
'roots' is a function from the file /usr/share/octave/3.8.1/m/polynomial/roots.m

-- Function File: roots (V)

For a vector V with N components, return the roots of the
polynomial

v(1) * z^(N-1) + ... + v(N-1) * z + v(N)

As an example, the following code finds the roots of the quadratic
polynomial

p(x) = x^2 - 5.

c = [1, 0, -5];
roots (c)
=> 2.2361
=> -2.2361

Note that the true result is +/- sqrt(5) which is roughly +/-
2.2361.

See also: poly, compan, fzero.

[#24091] Thursday, May 12, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ngthmated

Total Points: 12
Total Questions: 115
Total Answers: 113

Location: Saint Vincent and the Grenadines
Member since Wed, Apr 21, 2021
3 Years ago
;