# Tag Info

29

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. ...

17

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] + ...

15

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 ...

14

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] -> ...

13

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 ...

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 ... 12 Something similar showed up on StackExchange a while back (last August). http://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 ... 12 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 ... 11 This is not an answer, but a hint how to possibly proceed. It is a pity to pass on some nice Wolfram Language abilities. Let me know if I should remove it. Idea is: I think YOU should be the first to derive this integral - if it is possible. Consider only rational numbers. If this integral behaves smoothly - which it obviously does: ... 8 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 ... 7 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 ... 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 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 ... 6 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] ... 6 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) + ... 6 Here is a series-expansion way of doing your integral. Expand the integrand as Sum[(-1)^n Sin[θ/2]^(n β), {n, 0, ∞}] (* 1/(1+Sin[θ/2]^β) *) Integrate each term in the sum using Integrate[Sin[θ/2]^(n β), {θ, 0, π}] (* ConditionalExpression[(Sqrt[π] Gamma[1/2 (1 + n β)])/Gamma[1 + (n β)/2], Re[n β] > -1] *) Fold it all together to obtain ... 6 The integral is conditionally convergent. You can progress using substitution:$u=2^{\frac{r}{b}}\iff r= b\log_2 u $Hence,$\frac{dr}{du}=\frac{b}{u\ln 2}$You can do these substitutions in Mathematica: f[r_, b_, la_, k_] := 2^(r/b) Exp[k (2^(r/b) - 1)/la]/(b la) exp = f[x, a1, a2, a3] /. {2^(x/a1) -> u}; ex = D[a1 Log[2, u], u]; ans = Integrate[a1 ... 6 Here I define the expression and integrate it term by term using Distribute. Then I differentiate each term but with a Defer wrapping it, so the derivatives aren't actually carried out. FInally, I replace the terms that weren't integrated by the original function: expression = -Sin[t] + g[t] (* ==> g[t] - Sin[t] *) integrals = ... 6 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 ... 5 Since OP seems to be interested in numerical calculations, this might be more suitable: f0[x_]:= 1/Sqrt[2*Pi*1^2]*E^(-(x + 1)^2/(2*1^2)) q[1, A_, B_, f_] := f q[n_ /; n > 1, A_, B_, f_][x_] := Module[{ω},tempIntegrate[Evaluate[q[n - 1, A, B, f]][ω] f[x - ω], {ω, A, B}]] p[n_, A_, B_, f_] := tempIntegrate[q[n, A, B, f][x], {x, -∞, B}] + ... 5 I found a good solution. The new version of Mathematica is using the symbolic processing, so we can just turn it off. b[i_] := NIntegrate[(Sin[x] - 1) x^i, {x,-5,5}, Method->{Automatic,"SymbolicProcessing"->0}] source: Techniques for Accelerating NIntegrate Evaluations http://support.wolfram.com/kb/3442 5 Compute the indefinite integral instead. b[i_] := b[i] = Integrate[(Sin[x] - 1) x^i, x] Timing@N[Sum[(b@i /. x -> 5) - (b@i /. x -> -5), {i, 30}], 8] (* {0.359375, -3.7741840*10^20} *) 5 Not knowing what the actual differential equation is, I can only point out one obvious problem: you should define Clear[r,f,y]; M1[r_] = Integrate[(1 + f*Exp[-(r/y)^2])*(r)^2, r] instead of using := NIntegrate because you seem to be looking for an indefinite integral there. For numerical integration you have to specify integration limits. The Clear is ... 5 There exist few typos in your kernel definition. This is how your kernel looks assuming a=2 (we denote it as A while defining the kernel as Kpart in the following). Please utilize the code from here to solve your problem. Below I changed the constants and functional arguments of FredholmKind2 to fit your particular problem. n = 20;(*number of ... 5 Here is the result of your integral using all the corrections in my comment: Integrate[(E^(-((k - muK)^2/(2 stdK^2)) - (-muU + u)^2/(2 stdU^2)) u (z/z50)^k)/(2 π stdK stdU), u] 4 For the scalar case: Set up a function, h, depending on EFermi, and use FindRoot to solve h[EFermi]==c Clear[g, f, h]; g[x_] = Exp[-x^2/5000]; f[x_, EFermi_] = (1 + Exp[(x - EFermi)/25])^-1; h[EFermi_?NumericQ] := NIntegrate[g[x] f[x, EFermi], {x, -200, 200}] c = 100; sol = FindRoot[h[e] == c, {e, 10}] h[e] /. sol (* {e -> 55.2154} *) (* 100. *) ... 4 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 ... 4 This is a way which will give you a the final solution in terms of$\beta$. The idea is generate a Table of solution for different$\beta$value and then find a fitting function. I choose here$-10<\beta<10\$. data = Table[{\[Beta],NIntegrate[1/(Sin[\[Theta]/2]^\[Beta] + 1), {\[Theta],0,\[Pi]}]}, {\[Beta], -10, 10, .5}]; ListPlot[data] sol1 = ...

4

f[t_?NumericQ] = Sqrt[(-50.8938 Sin[8.4823 t])^2 + (4 - 11.3097 Sin[11.3097 t])^2]; Looking at a plot of f[t] to find an initial value for t in FindRoot Plot[f[t], {t, 0, .1}] Clear[a] a = a /. FindRoot[ NIntegrate[f[t], {t, 0, a}] == 1, {a, 0.08}] // Quiet 0.0680318 Check NIntegrate[f[t], {t, 0, a}] 1. Show[ RegionPlot[0 ...

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