Seems, an analytical solution is possible.
ξ0 = 39;
λ0 = 20;
max = 500;
B = 1/10;
integrand = E^(1/39 (-x + x1)) A[x1];
eq = -(Integrate[integrand, {x1, 0, 500}]/31200) +
A''[x]
Indefinite integration over x of A''[x] yields A'[x] and integration inside the x1-integral with integration constant r (I don't show all intermediate results here)
A'[x] == 1/31200 Integrate[Integrate[integrand, x] + r, {x1, 0, 500}]
Separate integration of r, the other part is 39*A''[x]
Edit: Correction of sign error
A'[x] == 1/31200 Integrate[r, {x1, 0, 500}] - 39 A''[x]
(* Derivative[1][A][x] == (5 r)/312 - 39 (A^′′)[x] *)
Since you know A'[0], you get
Derivative[1][A][0] == (5 r)/312 - 39 (A^′′)[0] == 1/10
Second integratio over x yield A[x]
A[x] == 1/31200 Integrate[
Integrate[(r - 39 E^(-(x/39) + x1/39) A[x1]), x] + s, {x1, 0, 500}]
The s and r term is 5/312 (s + r x)
plus 1521*A''[x]
1/31200 Integrate[s + r x, {x1, 0, 500}]
At x==500 you have
A[500] == 5/312 (500 r + s) + 1521 (A^′′)[500] == 0
Solve for r and s
sol1 = First@
Solve[{(5 r)/312 - 39 A''[0] == 1/10,
5/312 (500 r + s) + 1521 A''[500] == 0}, {r, s}]
The differential equation is now eq2, which can be solved with DSolve
eq2 = A[x] == 5/312 (s + r x) + 1521 A''[x] /. sol1 // Simplify
Solve deq
dsol1 = First@
DSolve[eq2 /. {A''[0] -> ass0, A''[500] -> ass500}, A, x]
(* {A -> Function[{x},
1/10 (-500 - 195000 ass0 - 15210 ass500 + x + 390 ass0 x) +
E^(x/39) C[1] + E^(-x/39) C[2]]} *)
To eliminate C1 and C2 solve with boundary conditions
sol2 = First@
Solve[{(A[500] /. dsol1) == 0, (A'[0] /. dsol1) == 1/10}, {C[1],
C[2]}]
now you have still a dependance of ass0 and ass500
A''[x] /. dsol1 /. sol2 // Simplify
(* (E^(-x/39) (ass0 (E^(1000/39) - E^(2 x/39)) +
ass500 (E^(500/39) + E^((2 (250 + x))/39))))/(1 + E^(1000/39)) *)
Solve for ass0 and ass500 with the found function A
sol3 = First@
Solve[{(A''[500] /. dsol1 /. sol2) ==
ass500, (A''[0] /. dsol1 /. sol2) == ass0}, {ass500, ass0}] //
Simplify
(* {ass0 -> ass500 E^(500/39)} *)
Get remainig ass500 by comparing both sides of the equation
ls = A''[x] /. dsol1 /. sol2 /. sol3 // Simplify
rs = Integrate[integrand /. dsol1 /. sol2 /. sol3, {x1, 0, 500}]/31200
sol4 = First@Solve[ls == rs, ass500] // Simplify
(* {ass500 -> -((539 - 39 E^(500/39))/(
15210 + 382000 E^(500/39) - 15210 E^(1000/39)))} *)
The desired function is then
A[x] /. dsol1 /. sol2 /. sol3 /. sol4 // Simplify[#, x > 0] &
(* (E^(-x/39) (819819 E^(500/39) - 59319 E^(1000/39) +
E^((500 + x)/39) (8648819 - 17179 x) -
1521 E^(x/39) (39 + x)))/(10 (-1521 - 38200 E^(500/39) +
1521 E^(1000/39))) *)
Test all conditions
A[500] /. dsol1 /. sol2 /. sol3 /. sol4 // Simplify[#, x > 0] &
(* 0 *)
A'[0] /. dsol1 /. sol2 /. sol3 /. sol4 // Simplify[#, x > 0] &
(* 1/10 *)
eq /. dsol1 /. sol2 /. sol3 /. sol4 // Simplify[#, x > 0] &
(* 0 *)
LogPlot[Evaluate[{-A[x], A[x]} /. dsol1 /. sol2 /. sol3 /. sol4 //
Simplify[#, x > 0] &], {x, 0, 500}, PlotStyle -> {Red, Blue}]
Plot[Evaluate[
A[x] /. dsol1 /. sol2 /. sol3 /. sol4 // Simplify[#, x > 0] &], {x,
0, 500}, PlotRange -> All]
NDSolve
can't solveIntegro-differential equation
ordelay Integro-differential equation
.You must implement the appropriate code yourself. $\endgroup$/;
not/.
$\endgroup$