We’re rewarding the question askers & reputations are being recalculated! Read more.

# Tag Info

35

Let me show how to roll your own numerical solution to a non-linear integral equation using a collocation method. It's fun! This will involve two approximations. First, we will approximate the function B[x] by its values at n particular points in the range {x, 0, 1}. The integral over x will be replaced by a weighted sum over n, i.e., a quadrature rule. ...

21

Mathematica is an incredible tool for checking conjectures and making sketches. I'm going to demonstrate it below. Let's start with checking that in case when $R_0$ (I replaced it with $R$) is a polynomial, the solution of this Volterra equation reduces to linear ODE. Lets take some derivatives of the equation: ClearAll[P, R, s, t]; eqn = P[t] == R[t] + ...

20

If you want to solve the Fredholm equation of the second kind which is an integral equation of the form $$f(x) - \lambda\int_{a}^{b} K(x,y)f(y)dy = g(x), \quad \forall x \in [a, b]$$ you can use the following code. We follow the simplistic source. One can make it much better by considering further implementation aspects as well as injecting more state of ...

15

This integral equation is solvable using the LaplaceTransform technique: Clear[s, t]; eqn = y'[t] == -Integrate[y[t1] Exp[t1 - t], {t1, 0, t}] LaplaceTransform[eqn, t, s] (* ==> s LaplaceTransform[y[t], t, s] - y[0] == -( LaplaceTransform[y[t], t, s]/(1 + s)) *) Solve[%, LaplaceTransform[y[t], t, s]] (* ==> {{LaplaceTransform[y[t], t, s] -> (...

14

Something similar showed up on StackExchange a while back (last August). https://stackoverflow.com/questions/6974929/how-can-i-reference-a-specific-point-of-my-function-inside-ndsolve Here is a variant from one response that I cobbled together to illustrate your case. I chose the kernel function (your R_0) to be e^(-x) + x sin(x) - x cos(x^2). I attempt to ...

14

NDSolve currently can't handle this kind of differential equation, LaplaceTransform is your friend. Since in this case inverse Laplace transform can't be done analytically by InverseLaplaceTransform, you need the help of numerical Laplace inversion package in addition: eq = {0.01 - 6.25 x[t] + (1.2 Integrate[x'[t - τ]/Sqrt[τ], {τ, 0, t}])/10^7 == 16 x''[t]};...

13

There are many sources that give practical advice on how to program such an integral equation. So I went a different route and asked myself how to get a solution by using the most literal application of the defining equation. By that I mean no explicit discretization, keeping the integral. That can be done using the assumption that the fixed-point theorem ...

12

I am not interested in the closed form solution of M(T) - and that's a great pity, since your equation can be solved exactly by using Laplace transform - for the numbers you have, and in the general case you can go a long way using the same approach. Analytical solution Applying Laplace transform to both sides of your equation, $\int_{0}^{\infty}e^{-p T}f(... 11 This is an eigenvalue problem. Let's apply a Galerkin scheme: We fix a finite dimensional space of functions, pick a basis$u_0, u_2,\dotsc,u_{n}and define the matrices $$A_{ij} = \int_0^1 \!\!\!\!\int_0^1 u_i(x) \, k(x,y) \, u_j(y) \, \operatorname{d}\! x \, \operatorname{d}\! y$$ and $$M_{ij} = \int_0^1 \!\!\!\!\int_0^1 u_i(x) \, u_j(y) \, \... 11 NDSolve is not capable of solving this sort of problem as a PDE. Thus, it is necessary to perform the computation by discretizing the PDE in x. This procedure is discussed in Introduction to Method of Lines. A while ago, I solved a somewhat similar problem, 78493, that involved an integral over u in one of the boundary conditions. Here, the integral of x ... 10 One can use Picard-type iteration to get the solution: Using an approximation to x'[t] (in the integral), we can integrate the ODE to obtain a new approximation. Remarkably, it converges in just two steps. My original thought was to step through the integration using the tools from tutorial/NDSolveStateData to build an interpolation of x'[t] at each step ... 10 I used the method of solving integro-differential equations proposed by Michael E2 on Solving an integro-differential equation with Mathematica I added new options to his code to solve this problem. The right figure in Figure 1 corresponds to Figure 1 of the article Viscous Flow at Infinite Marangoni Number by A. Thess, D. Spirn, and B. Juttner - see ... 9 This might help you get started. I think this is a variation on a method called Frobenius' method; the idea is to use the fact that the equation is linear to expand the solution over a set of basis functions (here B-Splines) and find the corresponding coefficients. It should provide you with an approximate solution (which you can improve upon while adding ... 9 I was not going to post this because in a previous edit (now gone) you showed a very difficult problem. Anyway, the current question could be answered as follows: You want to find f[x] satisfying f[x] == Integrate[f[x] g[x], x] for a known g[x]. Differentiating: f'[x] == g[x] f[x] So for example g[x_] := Sin@x^2; fs = DSolve[f'[x] == g[x] f[... 9 Because NDSolve cannot accommodate the x=0 boundary condition, it is necessary to perform this computation by discretizing the PDE in x. The resulting do-it-yourself procedure is discussed in Introduction to Method of Lines. For illustrative purposes, assume that x is divided into five equal segments. n = 5; h = 1/n; with a variable defined at each node, ... 9 Numerical solution: solution = NDSolve[{D[y[x], x] == x + f0[x], y[0] == 1, f0'[x] == y[x], f0[1] == 0}, y[x], {x, 0, 1}]; Symbolic solution from @rewi (Works only in MMA 11.0 and above.): sol = -((1 + E^2 + E^(1 - x) - 2 E^(2 - x) - 2 E^x - E^(1 + x))/(1 + E^2)); . Plot[{Evaluate[y[x] /. solution],sol}, {x, 0, 1}, PlotRange -> All, PlotStyle -> ... 9 As mentioned by Henrik, this is an eigenvalue problem. Since Mathematica doesn't have a built-in eigenvalue problem solver for integral equation, we need to discretize the equation to matrix form by ourselves and solve the resulting system with Eigensystem. Henrik has discretize the integral based on Galerkin scheme. Here I'd like to add a solution ... 9 Based on the hacky way I used in my answer here; I had to split up the NDSolve process, so as not to redefine MapThread too soon: L = 10; tmax = 2; sys = {D[u[x, t], t] + u[x, t]*D[u[x, t], x] + D[u[x, t], {x, 2}] + D[u[x, t], {x, 4}] + 1/(2 L)*int[D[u[x, t], {x, 3}], x, t] == 0, u[-L, t] == u[L, t], u[x, 0] == 0.1*Cos[\[Pi]/L*x]}; periodize[data_]... 8 With some effort you can find numerical solution. Let us discretize function f at num points, e.g. num=3. Then, select some integration rule, e.g. Lobatto one: {ab, w, err} = NIntegrate`LobattoRuleData[num, 4] (* {{0, 0.5000, 1.000}, {0.1667, 0.667, 0.1667}, {}} *) Next, replace Integrate with Sum at points ab with weights w and create Table of num ... 8 Use DSolve: PHI = DSolveValue[ϕ[x] == 3 + λ Integrate[ Cos[x - s] ϕ[s], {s, 0, Pi}], ϕ, x] (*Function[{x}, (3 (-2 + π λ - 4 λ Sin[x]))/(-2 + π λ)]*) The solution can be further used in the form PHI[x]. 7 Your s lives on the ray [1,infinity). Integrate can kinda figure out s is real. Tell it about the other variables and then we'll proceed from there. i1 = Integrate[(-(Cos[b*s] - (2*Sin[b*s]*(a*d - b*c))/(a^2 + b^2))/ E^(a*s))^2, {s, 1, \[Infinity]}, Assumptions -> {Element[{b, c, d}, Reals], a > 0}] (* Out[152]= 1/4 (1/a + 1/(2 a - 2 I b) + ... 7 Using your definitions (using the placeholder pattern f1[y_] instead of the absolute pattern f1[y] is usually a good idea if you want to use it as a function that works with numerical values, too. Also using := (SetDelayed) instead of = (Set) inserts the left hand side value y into the definition every time you use it, which is closer to the behavior you ... 7 Large t Approximation Because this is a neutral delay integral-differential equation, solving it may seem very difficult at first glance. However, the term 1/5^t makes the integral negligible for t greater than about 2. So, with the integral ignored for large t, the equation can be reduced to x[t] - x[t - 1]/(2 E) = c[2] t^2 + c[1] t + c[0] where the ... 7 Method 1, using Laplace transform eq = y'[t] + Integrate[y[x], {x, 0, t}] == Exp[-t]; eq = LaplaceTransform[eq, t, s]; eq /. LaplaceTransform[y[t], t, s] -> U0 sol = Solve[%, U0] Simplify@InverseLaplaceTransform[U0 /. sol, s, t] % /. y[0] -> 0 Method 2, convert to second order ODE You can, but you are missing a second initial condition. This is ... 7 list = {f1[t]/3 == (1/3) Integrate[f3[t], t], f1[t]/(6/5) == Integrate[f2[t], t], f3[t] == Integrate[f1[t], t]}; DSolve[D[list, t], {f1, f2, f3}, t] /. C[_] -> 1 /. HoldPattern@Function[a__, g_] :> Function[a, Evaluate@FullSimplify@g] (* {{f1 -> Function[{t}, E^t], f2 -> Function[{t}, (5 E^t)/6], f3 -&... 7 Being a mathematician, I resist fudging by cutting off the singularity by some small eps = 10^-12. But if you're an engineer, you should be satisfied @Nasser's answer, which likely yields single-precision accuracy, which is pretty good after all. A little analysis shows$$\eqalign{ w''(x) &= -{1\over x^2} \int_0^x \sin w(t) \; dt + {\sin w(x) \over x} \... 7 This integro-differential equation can be solved with the method mentioned in this answer i.e. differentiate the equation to make it a pure ODE. First, interprete the equations to Mathematica code. (BTW, if you had given the Mathematica code form of the equation in your question, your question would have attracted more attention. ) v = 1; ψ[ζ_] = ζ; f[ζ_, ... 7 If you can convert the integro-differential equation into an IVP or BVP ODE, then that would be the best approach. If you can't do so, then you can try the following iterative approach. The basic idea is to replace the unknownx(\eta )\$ in the integrand with an ansatz (guess), and then solve the resulting differential equation. Repeat, with the solution to ...

7

Just as an addition to @Okkes and @Ulrich's answer following the idea lined out by @LukasLang, we can also start with a symbolic solution of the integral for every p: Integrate[x^p/(x^p + c) x^p, {x, 0, 1}, Assumptions -> p > 0 && c < -1] Hypergeometric2F1[1, 2 + 1/p, 3 + 1/p, -(1/c)]/(c + 2 c p) Here we had to cheat a bit with the ...

6

It seems to me that for your first stated problem there is a much better method than Solve or Reduce: {m, k, p} = {16, 3, 6}; IntegerPartitions[m, {k}, Range@p] {{6, 6, 4}, {6, 5, 5}} If you want all permutations just use Permutations: Join @@ Permutations /@ % {{6, 6, 4}, {6, 4, 6}, {4, 6, 6}, {6, 5, 5}, {5, 6, 5}, {5, 5, 6}} For your second stated ...

Only top voted, non community-wiki answers of a minimum length are eligible