Question: Problem 3 could be more easily be solved using the roots() function, with the added benefit that we can also find the exact values (within

 Problem 3 could be more easily be solved using the roots()

Problem 3 could be more easily be solved using the roots() function, with the added benefit that we can also find the exact values (within the computer's numerical limits) where the polynomials are equal, and for all values of x (instead of just the range from 0 to 1). Write a SINGLE LINE of code for insertion into the function template below to allow the function to return ALL values of x for which p1(x) and p2(x) are equal. Assume here that p1 and p2 are polynomials of the same order. Don't overthink this problem, it is quite simple once you see the solution. Important: do not use any spaces or semicolons in your answer to ensure that automated grading will work! function x_eq = equal_vals(p1, p2) % Assume pi and p2 are the same order. % INSERT CODE HERE end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!