Question: Assuming that p + q > 0, the cubic polynomial x + 3px + 2q has a root r(p, q) = -q+q +p +

Assuming that p + q > 0, the cubic polynomial x + 3px + 2q has a root r(p, q) = -q+q +p + -9-q+p. Write a 

Assuming that p + q > 0, the cubic polynomial x + 3px + 2q has a root r(p, q) = -q+q +p + -9-q+p. Write a Python function r(p, q) which returns r(p, q). You can assume that the inputs p and q are real numbers such that q +p > 0. Your function must produce the correct result for any such p and q.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

You can define the function rp q in Python as follows Python 1 import cmath HNM st 2 m 3 ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!