Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in ODE-Solver-Documentation #22558

Closed
T-KS opened this issue Nov 28, 2021 · 5 comments · Fixed by #22565
Closed

Error in ODE-Solver-Documentation #22558

T-KS opened this issue Nov 28, 2021 · 5 comments · Fixed by #22565

Comments

@T-KS
Copy link

T-KS commented Nov 28, 2021

On page https://docs.sympy.org/latest/modules/solvers/ode.html
should'nt the description of 2nd_power_series_ordinary be
P(x)*y''(x) + Q(x)*y'(x) + R(x)*y(x)=0
and 2nd_power_series_regular same
P(x)*y''(x) + Q(x)*y'(x) + R(x)*y(x)=0
instead of P(x)*y''(x) + Q(x)*y'(x) + R(x)=0 both?

@ThePauliPrinciple
Copy link
Contributor

Yes, I also understand a second order homogeneous differential equation to have y(x) in the last term. (for convenience https://docs.sympy.org/latest/modules/solvers/ode.html#nd-power-series-regular)

@oscarbenjamin
Copy link
Contributor

This is probably just a typo

@T-KS
Copy link
Author

T-KS commented Nov 29, 2021

Yes, I also think it's a typo, but I didn't find a place to correct it (or an email ...)

@ThePauliPrinciple
Copy link
Contributor

A PR needs to be made which fixes the typos here

sympy/sympy/solvers/ode/ode.py

Lines 2279 to 2291 in ed0bfd1

def ode_2nd_power_series_ordinary(eq, func, order, match):
r"""
Gives a power series solution to a second order homogeneous differential
equation with polynomial coefficients at an ordinary point. A homogeneous
differential equation is of the form
.. math :: P(x)\frac{d^2y}{dx^2} + Q(x)\frac{dy}{dx} + R(x) = 0
For simplicity it is assumed that `P(x)`, `Q(x)` and `R(x)` are polynomials,
it is sufficient that `\frac{Q(x)}{P(x)}` and `\frac{R(x)}{P(x)}` exists at
`x_{0}`. A recurrence relation is obtained by substituting `y` as `\sum_{n=0}^\infty a_{n}x^{n}`,
in the differential equation, and equating the nth term. Using this relation
various terms can be generated.

and here

sympy/sympy/solvers/ode/ode.py

Lines 2424 to 2435 in ed0bfd1

def ode_2nd_power_series_regular(eq, func, order, match):
r"""
Gives a power series solution to a second order homogeneous differential
equation with polynomial coefficients at a regular point. A second order
homogeneous differential equation is of the form
.. math :: P(x)\frac{d^2y}{dx^2} + Q(x)\frac{dy}{dx} + R(x) = 0
A point is said to regular singular at `x0` if `x - x0\frac{Q(x)}{P(x)}`
and `(x - x0)^{2}\frac{R(x)}{P(x)}` are analytic at `x0`. For simplicity
`P(x)`, `Q(x)` and `R(x)` are assumed to be polynomials. The algorithm for
finding the power series solutions is:

@KuldeepBorkar
Copy link
Contributor

Ok, I will fix the typo quickly.

skirpichev added a commit to skirpichev/diofant that referenced this issue Dec 10, 2021
skirpichev added a commit to skirpichev/diofant that referenced this issue Dec 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants