Ostrogradsky's Method

버전 1.0.3 (2 KB) 작성자: Ryan Black
Function decomposes a proper rational fraction integrand via Ostrogradsky's method.
다운로드 수: 8
업데이트 날짜: 2021/2/18

라이선스 보기

Syntax:

[P_1,Q_1,P_2,Q_2] = ostrogradskysmethod(P,Q,x)

Description:

For an integral with an integrand that is a proper rational fraction, Ostrogradsky's decomposes the integral as

$\int \frac{P(x)}{Q(x)} \, dx = \frac{P_1(x)}{Q_1(x)} + \int \frac{P_2(x)}{Q_2(x)} \, dx. \tag*{} $

The inputs to ostrogradskysmethod are symbolic polynomials P and Q, with P being lesser degree than Q. The outputs are symbolic polynomials P_1, Q_1, P_2, and Q_2.

Examples:

Use Ostrogradsky's method to decompose an integral with P(x) = x^3-x^2+x+1 and Q(x) = (x^2+1)^3

syms x
P = x^3-x^2+x+1;
Q = (x^2+1)^3;
[P_1,Q_1,P_2,Q_2] = ostrogradskysmethod(P,Q,x)

P_1 =
x^3/4 - x^2/2 + (3*x)/4 - 1/2
Q_1 =
(x^2 + 1)^2
P_2 =
1/4
Q_2 =
x^2 + 1

Take the integral via Ostrogradsky's method and confirm that it matches MATLAB's solution

I = P_1/Q_1+int(P_2/Q_2)
I_c = int(P/Q)

I =
atan(x)/4 + (x^3/4 - x^2/2 + (3*x)/4 - 1/2)/(x^2 + 1)^2
I_c =
atan(x)/4 + (x^3/4 - x^2/2 + (3*x)/4 - 1/2)/(x^2 + 1)^2

인용 양식

Ryan Black (2024). Ostrogradsky's Method (https://www.mathworks.com/matlabcentral/fileexchange/87497-ostrogradsky-s-method), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2018b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.3

edit description

1.0.2

added example

1.0.1

edit description

1.0.0