Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Must be answered in a self-contained script. The graph of a function y = ax 3 +

ID: 3546582 • Letter: M

Question

Must be answered in a self-contained script.

The graph of a function y = ax3 + bx2 + cx + d passes through 4 given points (xi, yi) (where i = 1, 2, 3, 4). Write a function that accepts these 4 points as inputs and computes the coefficients a, b, c and d. The script should solve a set of linear equations in terms of the 4 unknowns. The script should identify whether a solution exists and, if it does, whether the problem is underconstrained or properly constrained and apply an appropriate method to solve. If no solution exists the script should identify this and exit to the command prompt without displaying an error. As well as displaying a solution, the script should display a note to the user saying whether or not the solution is unique.

This question is similar to:   http://www.chegg.com/homework-help/suppose-known-graph-function-y-ax3-bx2-cx-d-passes-given-poi-chapter-3-problem-17-solution-9780073385839-exc  but the second half is different.

Must be answered in a self-contained script. The graph of a function y = ax3 + bx2 + cx + d passes through 4 given points (xi, yi) (where i = 1, 2, 3, 4). Write a function that accepts these 4 points as inputs and computes the coefficients a, b, c and d. The script should solve a set of linear equations in terms of the 4 unknowns. The script should identify whether a solution exists and, if it does, whether the problem is underconstrained or properly constrained and apply an appropriate method to solve. If no solution exists the script should identify this and exit to the command prompt without displaying an error. As well as displaying a solution, the script should display a note to the user saying whether or not the solution is unique. This question is similar to: http://www.chegg.com/homework-help/suppose-known-graph-function-y-ax3-bx2-cx-d-passes-given-poi-chapter-3-problem-17-solution-9780073385839-exc but the second half is different.

Explanation / Answer

clc;

close all;

clear all;


%y=(a*x^3)+(b*x^2)+(c*x)+d;

x=[1 2 3 4]; %we find the coefficients of equations and form a matrix

y=[3 5 4 2];

for i=1:4

for j=1:4

A(i,j)=(x(i))^(4-j);

end

end

if abs(det(A))>0

display('solution exists')

x=A*y'; %the matrix is inverted and multiplied with y for coefficients

display('solution is unique')

end