compute sum of polynomial square

1 次查看(过去 30 天)
Can I solve sum of polynomial square in a one variable ?
e.g. (1+x)^2 + (3+x)^2 +2*x =
Can Mathlab compute result as x variable ?
  3 个评论
Walter Roberson
Walter Roberson 2024-8-3
syms x
eqn = (1+x)^2 + (3+x)^2 +2*x
eqn = 
solx = solve(eqn, x)
solx = 
RICCARDO
RICCARDO 2024-8-3
编辑:RICCARDO 2024-8-3
result shuld be : (1+2x+x^2) + (9+6x +x^2) + 2x
that is finally : 2x^2 + 10x + 10
This is a simple expression expansion
I'd like to plot it too
thanks

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2024-8-3
移动:Matt J 2024-8-4
syms x
eqn = (1+x)^2 + (3+x)^2 +2*x
eqn = 
expand(eqn)
ans = 

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Polynomials 的更多信息

产品


版本

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by