3
$\begingroup$

Please help me solving the variation of f and g with z in this nonlinear second order differential equation containing non-linear part in the integration. The nonlinear part comes out to be infinite series on expansion. I have used the following approach, anyone please give me suitable advice for this. Thank you.

 A = 1/f[z]^3

B = x*y^(-1/2)*Exp[-2*x]*
  Exp[-2*y]*(1 + (1/(f[z]^2 * g[z])) (Exp[-x]*Exp[-y]*x^2))^(-1/2)

C1 = Integrate[B, {x, 0, Infinity}, {y, 0, Infinity}]

D1 = 1/g[z]^2

E1 = x*y^(1/2)*Exp[-2*x]*
  Exp[-2*y]*(1 + (1/(f[z]^2 * g[z])) (Exp[-x]*Exp[-y]*x^2))^(-1/2)

F = Integrate[E1, {x, 0, Infinity}, {y, 0, Infinity}]

F1 = C1 - (1/f[z])*(D[f[z], z])^2

G1 = F - (1/g[z])*(D[g[z], z])^2

sol = NDSolve[{D[f[z], {z, 2}] == F1, D[g[z], {z, 2}] == G1, 
   f[0] == 1, f'[0] == 0, g[0] == 1, g'[0] == 0}, {f[z], g[z]}, {z, 0,
    5}]
$\endgroup$
2
  • $\begingroup$ It gets stuck on C1 = Integrate[B, {x, 0, Infinity}, {y, 0, Infinity}] and F = Integrate[E1, {x, 0, Infinity}, {y, 0, Infinity}] and both are needed later for the NDSolve. This is a very difficult problem. Would you mind telling me what what physical/natural/scientific problem this comes from? $\endgroup$
    – flinty
    Jul 20, 2020 at 11:53
  • $\begingroup$ Actually, I want to check the variation of f and g with z(distance). I want these to check focusing of spot size of some particle beam with distance using these two differential coupled equations. $\endgroup$
    – Proxy Kad
    Jul 20, 2020 at 12:03

1 Answer 1

2
$\begingroup$

Hint.

n = 3;
tmax = 5;
E1 = x*y^(1/2)*Exp[-2*x]*Exp[-2*y]*(1 + fg (Exp[-x]*Exp[-y]*x^2))^(-1/2)
F = Integrate[Normal[Series[E1, {fg, 0, n}]], {x, 0, Infinity}, {y, 0, Infinity}] /. {fg -> 1/f[z]^2/g[z]}
F1 = F - (1/f[z])*(D[f[z], z])^2
G1 = F - (1/g[z])*(D[g[z], z])^2
sol = NDSolve[{D[f[z], {z, 2}] == F1, D[g[z], {z, 2}] == G1, f[0] == 1, f'[0] == 0, g[0] == 1, g'[0] == 0}, {f[z], g[z]}, {z, 0, tmax}][[1]]
Plot[Evaluate[{f[z], g[z]} /. sol], {z, 0, tmax}]
$\endgroup$
3
  • $\begingroup$ Thanks for the reply. But the main problem is in the integration part having (1+variables)^(-1/2) in E1 i.e. the term (1 + (1/(f[z]^2 * g[z])) (Exp[-x]*Exp[-y]*x^2))^(-1/2) and then its integration through F = Integrate[E1, {x, 0, Infinity}, {y, 0, Infinity}] $\endgroup$
    – Proxy Kad
    Jul 20, 2020 at 12:11
  • $\begingroup$ I hadn't noticed the E1 dependency on $z$ Perhaps now this works.I tried it with n from 2 to 10 with no noticeable difference in response $\endgroup$
    – Cesareo
    Jul 20, 2020 at 13:41
  • $\begingroup$ It is really helpful. Actually I have approached this problem in a similar way by using binomial theorem i.e. upto n=2 limit. Is there any other approach in which it is not required to limit the expansion in this approach? $\endgroup$
    – Proxy Kad
    Jul 21, 2020 at 6:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.