solving for square root with four variables in Mathematica, no response with code -


i have tried unsuccessfully obtain expression x following code in mathematica, have 4 variables, x, r, , b. suggestions?

select[x, #1 \[element] reals &] roots = x /. solve[ sqrt[29991348849*x^2 - 13958305552*x + 992000000 - r + - b] == 0, x] result1 = select[roots, im@# == 0 &] 

to clarify @troyhaskin's comment, re , im functions provide real , imaginary components of complex number. symbols a , b have no definition roots found solve cannot complex

it should noted complex cannot have 0 imaginary component:

head[complex[2,0]] (*integer*) 

this expression has real , complex roots:

roots = x /. solve[(x^4 - 1) (x^4 - 4) == 0, x]; ({-1, -i, i, 1, -sqrt[2], -i sqrt[2], sqrt[2], sqrt[2]})

the complex roots can found using freeq , !:

select[roots, !freeq[#, _complex] &] (*{-i, i, -i sqrt[2], sqrt[2]}*) 

Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -