manually coding partial fractions

4 Ansichten (letzte 30 Tage)
callum linnegan
callum linnegan am 24 Apr. 2020
Beantwortet: Star Strider am 24 Apr. 2020
Hi i was wondering if there is a way to maunually code partial fractions, i want to be able time the LHS denominator to the RHS and then group the values in terms of x^3,x^2 and x.
This is the question i am trying to solve.
I have done the first part by hand and used matlab to check my answer but i cant find a way to group the terms.
If anyone could help or direct me in the right direction it would be much Appreciated.
syms A1 A2 A3 A4
eqn1 = 2*A1 + A4 == 3;
eqn2 = A3 - 2*A4 == -2;
eqn3 = -A1 -2*A3 + A4 == -3;
eqn4 = -A1 + A3 ==2;
[M,B] = equationsToMatrix([eqn1,eqn2,eqn3,eqn4],[A1,A2,A3,A4])
X = linsolve(M,B)

Antworten (1)

Star Strider
Star Strider am 24 Apr. 2020
The Symbolic Math Toolbox partfrac function (introduced in R2015a) will do exactly what you want:
syms x
Eq = (2*x^5 -2*x^4 + 2*x^3 + 3) / (2*x^4 - 2*x^3 - x^2 + 1);
Eqpf = partfrac(Eq, x)
Eqpf = vpa(Eqpf)
producing:

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by