Mathematica Asked on May 2, 2021
I want to plot the expression formed from numerically calculated Poisson integrals (aka fundamental solutions of heat equation). I can only get numerical values. This question arises from my previous one.
ODE system. We extract the solutions.
s = NDSolve[{u'[x] == -3 W[x] + x, W'[x] == u[x] - W[x]^3, u[0] == -1,
W[0] == 1}, {u, W}, {x, 0, 200}]
G = First[u /. s]
g = First[W /. s]
They will serve as initial conditions in Poisson integrals.
Now we choose parameter, some x and t and integration limits.
[Epsilon] = 1/10
T = -1/2
X = 10
p1 = -200
p2 = 200
Now we consctruct the expression.
Q1 = 1/( 2 Sqrt[Pi *((T) + 1)*([Epsilon])^(2)]) NIntegrate[
Exp[-(Abs[X - [Xi]])^2/(4*((T) +
1)*([Epsilon])^(2))] g[[Xi]] G[[Xi]]
(-1/(2*([Epsilon])^2)), {[Xi], p1, p2}]
Q2 = 1/( 2 Sqrt[Pi *((T) + 1)*([Epsilon])^(2)]) NIntegrate[
Exp[-(Abs[X - [Xi]])^2/(4*((T) +
1)*([Epsilon])^(2))] g[[Xi]], {[Xi], p1, p2}]
q = (-2 ([Epsilon])^2 )*(Q1/Q2)
I need to plot and animate q
for any x and t intervals. By the code above I can only get numerical values.
Tried to get the tables of values and then animate it like this…
plots = Table[
Plot[(1/( 2 Sqrt[Pi *((t) + 1)*([Epsilon])^(2)]) NIntegrate[
Exp[-(Abs[x - [Xi]])^2/(4*((t) +
1)*([Epsilon])^(2))] g[[Xi]] G[[Xi]] (-1/(2*(
[Epsilon])^2)), {[Xi], p1, p2}])/(1/(
2 Sqrt[Pi *((t) + 1)*([Epsilon])^(2)]) NIntegrate[
Exp[-(Abs[x - [Xi]])^2/(4*((t) +
1)*([Epsilon])^(2))] g[[Xi]], {[Xi], p1, p2}]), {x,
0, 2}, PlotRange -> {-10, 10}], {t, -2, 0, .25}];
ListAnimate[plots]
But Mathematica is just running and I receive the error that one number "is too small to represent as a normalized machine number".
I think it should be very simple but I am a newbie in Wolfram Mathematica so I’m sorry if the question is too trivial. Hope to get help.
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP