0
$\begingroup$

I have been trying to solve the integral equation below, but cant seem to find a way out of this. Can someone please help me out with suggestion?

$f(t)=\int_0^{\infty}\frac{K_1a(t)}{a(t)+K_2}\,dt$

where $K_1$ and $K_2$ are some constants and $a(t) = \frac{Q}{(4\pi Nt)^{3/2}}*\exp(-x^2/(4Nt))$.

Thank you so much

$\endgroup$
5
  • $\begingroup$ @0xFE : I would suggest that latex version will cause problem in taking this to notebook, so its better to be converted as Mathematica code or putting both. $\endgroup$ Commented Feb 23, 2014 at 6:31
  • 2
    $\begingroup$ This does not look like an integral equation. Please be more specific: what is the unknown function you are looking for? From the description above I can only conclude that it is f(t). Am I right? If I am not, then what? If I am, it is just a problem of calculating an integral. $\endgroup$ Commented Feb 24, 2014 at 8:59
  • $\begingroup$ @Alexi Boulbitch, yes it is just an integral equation, but what I want is if anyone knows how to get a closed-form expression for f(t) (not necessarily numerical results). $\endgroup$
    – user12553
    Commented Feb 24, 2014 at 9:03
  • 2
    $\begingroup$ @user12553 Wikipedia states the following: "In mathematics, an integral equation is an equation in which an unknown function appears under an integral sign." This is not the case in your expression above. Thus, no, it is not an integral equation. $\endgroup$ Commented Feb 26, 2014 at 9:18
  • $\begingroup$ @AlexeiBoulbitch it is an integral equation (wrt to t in this case), and I do have the clues now to solving it, thanks to the suggestions below. And thanks to you too $\endgroup$
    – user12553
    Commented Feb 27, 2014 at 8:11

3 Answers 3

1
$\begingroup$

Just some points:

  1. $a$ is a function of $x$ and $t$. Hence $f$ as defined will be a function of $x$.,ie. $f(x)=\int_0^\infty g(x,t)\, dt$ where $g(x,t)$ is your integrand.
  2. To numerically integrate (as question title asks &given function of Gaussian's[diffusion eqn soln]), $f(x)$ needs a numerical argument.
  3. I am not sure what your ultimate aim is.

With these comments and hopefully helpful:

a[x_, t_, q_, n_] := q Exp[-x^2/(4 n t)]/(4 Pi n t)^(3/2);
f[x_, q_, n_, k1_, k2_] := 
 k1 NIntegrate[a[x, t, q, n]/(k2 + a[x, t, q, n]), {t, 0, Infinity}]

Applying, e.g. visualingf:

Plot[f[x, 1, 1, 1, 1], {x, -1, 1}]

This may take variable time depending on arguments. I hope this facilitates your aims.

enter image description here

$\endgroup$
2
  • $\begingroup$ thanks for your answer. Yes the points you highlighted above are very correct and related to what I am working with. My aim is to obtain an explicit expression for the integral result and be able to plot it. The plot based on numerical integration looks quite good and seem to conform with the theory I am working on $\endgroup$
    – user12553
    Commented Feb 24, 2014 at 6:55
  • 1
    $\begingroup$ @user12553 ok...I believe (as your question title suggests) that you will need evaluate integral numerically (as is done above),i.e. as with Gaussian: no closed form. You can then choose how to deal with values of functions: tabulate, plot using mesh size of your choice, interpolate if you wish etc. Expert users may provide you more helpful advice, esp. re: numerical considerations. $\endgroup$
    – ubpdqn
    Commented Feb 24, 2014 at 7:18
0
$\begingroup$

I tried a few random values for constants and it worked for me. Here are some things you might be doing wrong:

  • Using N as a variable: N is a protected symbol. Use n
  • Using Integrate instead of NIntegrate when you want a numerical answer
  • Defining the integral as a function: You are using $t$ as the integration variable, not as a function parameter.
$\endgroup$
1
  • $\begingroup$ Yes I am using t as a variable and wish to retain it after integration so as to be able to plot the result as a function on a time line $\endgroup$
    – user12553
    Commented Feb 23, 2014 at 7:10
0
$\begingroup$

Does this help, first you replace your equation as,

Simplify[(k1*a[t])/(a[t] + k2) dt /. a[t] -> (Q/(4*Pi*N*t)^(3/2))*exp (-x^2/(4*N*t))]

(dt exp k1 Q x^2)/(-32 k2 [Pi]^(3/2) (N t)^(5/2) + exp Q x^2)

Now apply integral,

Integrate[ Simplify[-((dt exp k1 Q x^2)/(32 N \[Pi]^(3/2) t (N t)^(
        3/2) (k2 - (exp Q x^2)/(32 N \[Pi]^(3/2) t (N t)^(3/2)))))], t]

$\frac{\text{dt} \exp ^{2/5} \text{k1} Q^{2/5} x^{4/5} \left(-\sqrt{5} \log \left(\exp ^{2/5} Q^{2/5} x^{4/5}+\left(1+\sqrt{5}\right) \pi ^{3/10} \sqrt[5]{\exp } \sqrt[5]{\text{k2}} \sqrt{N} \sqrt[5]{Q} \sqrt{t} x^{2/5}+4 \pi ^{3/5} \text{k2}^{2/5} N t\right)+\log \left(\exp ^{2/5} Q^{2/5} x^{4/5}+\left(1+\sqrt{5}\right) \pi ^{3/10} \sqrt[5]{\exp } \sqrt[5]{\text{k2}} \sqrt{N} \sqrt[5]{Q} \sqrt{t} x^{2/5}+4 \pi ^{3/5} \text{k2}^{2/5} N t\right)+\sqrt{5} \log \left(\exp ^{2/5} Q^{2/5} x^{4/5}-\left(\sqrt{5}-1\right) \pi ^{3/10} \sqrt[5]{\exp } \sqrt[5]{\text{k2}} \sqrt{N} \sqrt[5]{Q} \sqrt{t} x^{2/5}+4 \pi ^{3/5} \text{k2}^{2/5} N t\right)+\log \left(\exp ^{2/5} Q^{2/5} x^{4/5}-\left(\sqrt{5}-1\right) \pi ^{3/10} \sqrt[5]{\exp } \sqrt[5]{\text{k2}} \sqrt{N} \sqrt[5]{Q} \sqrt{t} x^{2/5}+4 \pi ^{3/5} \text{k2}^{2/5} N t\right)-4 \log \left(\sqrt[5]{\exp } \sqrt[5]{Q} x^{2/5}-2 \pi ^{3/10} \sqrt[5]{\text{k2}} \sqrt{N} \sqrt{t}\right)+2 \sqrt{10-2 \sqrt{5}} \tan ^{-1}\left(\frac{8 \pi ^{3/10} \sqrt[5]{\text{k2}} \sqrt{N} \sqrt{t}-\left(\sqrt{5}-1\right) \sqrt[5]{\exp } \sqrt[5]{Q} x^{2/5}}{\sqrt{2 \left(5+\sqrt{5}\right)} \sqrt[5]{\exp } \sqrt[5]{Q} x^{2/5}}\right)-2 \sqrt{2 \left(5+\sqrt{5}\right)} \tan ^{-1}\left(\frac{\left(1+\sqrt{5}\right) \sqrt[5]{\exp } \sqrt[5]{Q} x^{2/5}+8 \pi ^{3/10} \sqrt[5]{\text{k2}} \sqrt{N} \sqrt{t}}{\sqrt{10-2 \sqrt{5}} \sqrt[5]{\exp } \sqrt[5]{Q} x^{2/5}}\right)\right)}{40 \pi ^{3/5} \text{k2}^{2/5} N}$

$\endgroup$
9
  • $\begingroup$ Thanks a lot. I applied: Integrate[ Simplify[-((dt exp k1 Q x^2)/(32 N [Pi]^(3/2) t (N t)^(3/ 2) (k2 - (exp Q x^2)/(32 N [Pi]^(3/2) t (N t)^(3/2)))))], t] and got the answer ->dt exp k1 Q x^2 [Integral]1/(-32 k2 [Pi]^(3/2) (N t)^(5/2) + exp Q x^2) [DifferentialD]t this doesn't give the same answer as yours, I dont know why $\endgroup$
    – user12553
    Commented Feb 23, 2014 at 7:07
  • $\begingroup$ could be version mismatch or some subtle issue. I am getting what I have written. $\endgroup$ Commented Feb 23, 2014 at 7:15
  • $\begingroup$ Please are you using Mathematica 8 or Mathematica 9? cos I am using Mathematica 8 version $\endgroup$
    – user12553
    Commented Feb 23, 2014 at 7:22
  • $\begingroup$ mine is version 9. With version 8 I get -0.0056121 dt exp k1 Q x^2 \[Integral]1/( k2 t (N t)^(3/2) - 0.0056121 exp Q x^2) \[DifferentialD]t $\endgroup$ Commented Feb 23, 2014 at 7:27
  • 1
    $\begingroup$ I'm pretty sure that exp(...) should be Exp[...] instead. $\endgroup$
    – user484
    Commented Feb 23, 2014 at 12:57

Your Answer

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

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