Simplify symbolic expression for the Taylor series

2 ビュー (過去 30 日間)
Hau Kit Yong
Hau Kit Yong 2019 年 3 月 12 日
コメント済み: Hau Kit Yong 2019 年 3 月 12 日
I have written some code that generates a system of symbolic, nonlinear equations based on Taylor series expansions. For example, an equation with order 2 is
eqn1 = y1/2 - x2/6 - x1/2 + y2/6 + (x1 - y1)^2/8 + ((x1/3 - y1/3)*(x2 - y2))/8 + ((x2/3 - y2/3)*(x1 - y1))/8 + ((x2/9 - y2/9)*(x2 - y2))/8
where the x's and the y's are symbolic variables. This expression can obviously be simplified even further into
eqn1_simplified = y1/2 - x2/6 - x1/2 + y2/6 + (x1 - y1)^2/8 + ((x1 - y1)*(x2 - y2))/12 + ((x2 - y2)^2/72
but it seems like the coefficients in the brackets are preventing me from doing so. I have tried using simplify and simplifyfraction but it just returns the expression in eqn1.
  2 件のコメント
madhan ravi
madhan ravi 2019 年 3 月 12 日
how do you want the result look like?
Hau Kit Yong
Hau Kit Yong 2019 年 3 月 12 日
I want eqn1 to be simplified into eqn1_simplified.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

製品


リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by