0
$\begingroup$

I try to implement a population model with age structure in Mma12 using NDSolve to get a numerical solution for my PDE. However, one boundary condition involves an integral, which gives me problems (using either Integrate or NIntegrate).

NDSolve[{D[n[t, a], t] + D[n[t, a], a] == -0.00002*Exp[0.099*t]*
n[t, a],n[0, a] == 100*Exp[-0.0163*(a - 30.8)^2], n[t, 0] == Integrate[
0.1134*Exp[-0.0163*(a - 30.8)^2]*n[t, a2], {a2, 0, 100}]}, n[t, a], {t, 0, 100}, {a, 0, 100}]

In this post they used a trick to avoid the integral, but I don't think I can use it in my case. Any help is appreciated.

$\endgroup$
3
  • $\begingroup$ You might find 84978 or 78493 helpful. $\endgroup$
    – bbgodfrey
    Commented Sep 14, 2020 at 22:39
  • $\begingroup$ Yes, the BC problem in 78493 is basically identical to my situation! Since Mma seems unable to handle this, I tried to understand the method of lines. But in all examples that I found, the approximation used for discretization is for a 2nd order derivative (e.g. Uxx(x,t)), while I only have a first order derivative. So, I would need a different approximation like (u(x+h)-u(x-h))/2h ?! $\endgroup$
    – Axel
    Commented Sep 24, 2020 at 8:05
  • $\begingroup$ Okay, I just saw that you used in 84978 this approximation for the first derivative. Sorry that I didn't spot that earlier. $\endgroup$
    – Axel
    Commented Sep 24, 2020 at 9:16

0

Your Answer

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