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

How to specify integration borders for Integro-Differential equation? #949

Open
lhapp27 opened this issue Jan 17, 2025 · 2 comments
Open

Comments

@lhapp27
Copy link

lhapp27 commented Jan 17, 2025

Hello, first-time user here.
I plan to solve the integro-differential equation:

$$\frac{d^2}{d\alpha^2} \phi(\alpha,\rho) - [\beta+f(\alpha,\rho)]\phi(\alpha,\rho) - f(\alpha,\rho) \int_{|\pi/3 - \alpha|}^{\pi/2 - |\pi/6-\alpha|} d\alpha' \phi(\alpha',\rho) = 0$$
My goal is to find the eigenvalue $\beta = \beta(\rho)$, and the eigenfunction $\phi(\alpha,\rho)$, where $\rho$ is an external parameter, and $\alpha \in [0,\pi/2]$
For now, let's forget about the function $f$, i.e. $f = 1$.

In the documentation (https://juliaapproximation.github.io/ApproxFun.jl/latest/usage/operators/#Algebraic-manipulation-of-operators), there is some information on how to deal with integrals, however the borders seem to be fixed at -1 and 1. Is there a way (and how) to provide the integration borders as in my case?

Any help is appreciated.

@jishnub
Copy link
Member

jishnub commented Jan 17, 2025

You need to set the domain to one that you want to integrate over. By default, the documentation mentions -1 to 1 because this is the domain for the canonical Chebyshev polynomials.

@lhapp27
Copy link
Author

lhapp27 commented Jan 20, 2025

Thank you for the quick reply. I understand now partially, however I think the documentation doesn't mention it explicitly. Also one needs to pay attention that the integrand is defined in a space at least as large as the integration borders. Maybe that is obvious, but newcomers might struggle. Here an example:

x = Fun(0..pi/2)
u = 1/(1+x^2)
integral1 = DefiniteIntegral(Chebyshev(0..pi/2))
i1 = integral1 * u;
println("i1 = ",i1(0)) # i1 = 1.0038848218538874 (correct)

x = Fun(0..pi/2)
u = 1/(1+x^2)
integral2 = DefiniteIntegral(Chebyshev(0..pi))
i2 = integral2 * u;
println("i2 = ",i2(0)) # i2 = 1.0038848218539356 (incorrect), there is a warning though about "Maximum number of coefficients reached"

x = Fun(0..pi)
u = 1/(1+x^2)
integral3 = DefiniteIntegral(Chebyshev(0..pi))
i3 = integral3 * u;
println("i3 = ",i3(0)) # i3 = 1.2626272556789127 (correct)

So this works for constant integration borders, but any help on how to define the borders such that they depend on alpha, which is the dynamical variable in my equation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants