Polynomials in different variables addition.

I wanted to add two or more polynomials with which are functions of different variables like 2x^2+3x+5 and 5y^2+8y+6 in matlab. i just need the answer for optimization purposes. i am aware that the constant part will only add up , but that's all i need. any help would be very much appreciated

2 件のコメント

KSSV
KSSV 2017 年 4 月 13 日
Is using symbolic calculation allowed?
syms x y
f1 = 2*x^2+3*x+5 ;
f2 = 5*y^2+8*y+6 ;
f = f1+f2
Guillaume
Guillaume 2017 年 4 月 13 日
And if symbolic is not allowed, then it's not clear what's even being asked.
The sum of two independent functions of independent variables, f(x) and g(y) is ... drumroll ... f(x)+g(y). That f and g are polynomial functions does not matter. There's nothing to simplify.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangePolynomials についてさらに検索

質問済み:

2017 年 4 月 13 日

コメント済み:

2017 年 4 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by