the product of four consecutive even integers is 13440. Using Matlab's build-in function for operations with polynomials, determine the four integers.
I don't know how to do that
answer is 8 10 12 14
help me please
No products are associated with this question.
One approach is to use brute force:
N = 13440 ; for k = 2:N v = k + [0:2:6] ; p = prod(v) ; if prod(v)==N, disp('N is the product of :') ; disp (v) break elseif prod(v) > N disp('There is no solution') break end end
There are many optimalisations that can be made ...
y = x*(x+2)*(x+4)*(x+6)
= x * ( x^3+10x^2+24x + 2x^2+20X+48)
= x^4 + .... and so on.
Then subtract 13440 and use fzero to determine the root. Perhaps that's what he meant.
Hint: What if you solved the polynomial equation
using MATLAB's commands POLY and ROOTS?