How to do that.the product of four consecutive even integers is 13440. Using Matlab?
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (3)
Image Analyst
el 20 de Sept. de 2013
1 voto
y = x*(x+2)*(x+4)*(x+6)
= x*(x+2)*(x^2+10X+24)
= 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.
2 comentarios
Image Analyst
el 20 de Sept. de 2013
Visualizing it helps:
x = -20:10;
y = x.*(x+2).*(x+4).*(x+6);
plot(x,y, 'bs-', 'LineWidth', 3);
xl = xlim;
% Plot a horizontal line at y = 13440
line([xl(1), xl(2)], [13440, 13440], ...
'Color', [1,0,0], 'LineWidth', 3);
grid on;
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
pitchaorn
el 23 de Sept. de 2013
Hint: What if you solved the polynomial equation
x*(x+2)*(x+4)*(x+6)=13440
using MATLAB's commands POLY and ROOTS?
Sean de Wolski
el 20 de Sept. de 2013
Obligatory one-liner:
vals = 2*find(prod(bsxfun(@plus,(2:2:13440).',0:2:6),2)==13440)+[0:2:6]
1 comentario
pitchaorn
el 23 de Sept. de 2013
Categorías
Más información sobre Mathematics en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!