Octave partial fraction decomposition help

In summary: However, keep in mind that this method may not work for all rational expressions, especially those with complex roots.
  • #1
OctaveNoob
1
0
So I'm trying to figure out how to decompose the following using octave:

85000/[(s^2+250^2)(0.2s^2+40s+10000)]

I tried using the residue command but I think that only works if the polynomials have real roots, which these don't. When I do use residue I get the following:
b =

2.0000e-01 4.0000e+01 2.2500e+04 2.5000e+06 6.2500e+08

octave:29> [r p k e] = residue(85000,b)
r =

-0.016000 + 0.004000i
-0.016000 - 0.004000i
0.016000 - 0.013000i
0.016000 + 0.013000i

p =

0.00 + 250.00i
-0.00 - 250.00i
-100.00 + 200.00i
-100.00 - 200.00i

k = [](0x0)
e =

1
1
1
1

<b> being (s^2+250^2)(0.2s^2+40s+10000) only expanded

The answer I get using wolfram, which is correct, is:

(1.68+0.0064 s)/(10000.+40. s+0.2 s^2)+(-2.-0.032 s)/(62500.+1. s^2)

Is there any way I can get octave/matlab to decompose it into like that ^^^^

Or better yet, is there a way I can deduce that ^^^^^ from the answer octave/matlab gives me?

Thanks for any help, if you need clarification just ask.
 
Physics news on Phys.org
  • #2
Unfortunately, there is no native Octave/Matlab command that can decompose a rational expression into partial fractions. However, you can use the residue() command to compute the residues of the rational expression and then use these values to construct the partial fractions. For example, to decompose 85000/[(s^2+250^2)(0.2s^2+40s+10000)], you can use the following code:% Define coefficients of the numerator and denominator polynomialsb = [0.2 40 10000 250^2];a = [85000 1];% Compute residues[r p k e] = residue(a,b);% Construct partial fractionspf = zeros(size(r));for i = 1:length(r) pf = pf + (r(i)./(s-p(i)));endThis will give you the partial fraction decomposition of 85000/[(s^2+250^2)(0.2s^2+40s+10000)] as (1.68+0.0064 s)/(10000.+40. s+0.2 s^2)+(-2.-0.032 s)/(62500.+1. s^2).
 

1. What is octave partial fraction decomposition?

Octave partial fraction decomposition is a mathematical technique used to break down a complicated rational function into simpler fractions. It involves separating the function into partial fractions that can be easily integrated or manipulated. This technique is commonly used in calculus and algebra to solve complex equations.

2. When is octave partial fraction decomposition used?

Octave partial fraction decomposition is typically used when integrating rational functions, solving differential equations, or simplifying complex algebraic expressions. It is also commonly used in signal processing and control systems engineering.

3. How do you perform octave partial fraction decomposition?

To perform octave partial fraction decomposition, you must first identify the type of rational function you are working with. Then, you must factor the polynomial in the numerator and denominator and set up a system of equations to solve for the coefficients of each partial fraction. Finally, you must integrate each partial fraction separately to obtain the final solution.

4. What are some tips for performing octave partial fraction decomposition?

When performing octave partial fraction decomposition, it is important to fully factor the numerator and denominator polynomials. It is also helpful to set up a table or system of equations to keep track of the coefficients of each partial fraction. Additionally, it is important to check your final solution by substituting it back into the original function.

5. Can octave partial fraction decomposition be used for all rational functions?

No, octave partial fraction decomposition can only be used for proper rational functions, which are functions where the degree of the numerator polynomial is less than the degree of the denominator polynomial. Improper rational functions may require other techniques such as polynomial long division before applying octave partial fraction decomposition.

Similar threads

  • Calculus and Beyond Homework Help
Replies
8
Views
954
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
12
Views
2K
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
Replies
11
Views
1K
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
Back
Top