Mathematica Animated Plot only showing graph for first frame then changing range

35 Views Asked by At

Attempting to solve PDE's using Mathematica. I believer I'm getting the right answer and have most the code down but the animation is only showing the function in the first frame. I've been working through error's all day but this one has really stumped me. Any help would be appreciated.

Here is the problem statement and what I'm looking for with the animation. PDE and Initial Conditions Problem Statement for Animation

Mathematica Code:

''' [In] Clear[v, x, t];

eqn2 = D[v[x, t], {t, 2}] - 4 D[v[x, t], {x, 2}] == 0;
ic1 = v[x, 0] == Exp[-(x - 5)^2];
ic2 = D[v[x, t], t] == 0 /. t -> 0;
ic3 = D[v[x, t], x] == 0 /. x -> 0;

sol2 = DSolve[{eqn2, ic1, ic2, ic3}, v[x, t], {x, t}];
v[x_, t_] = v[x, t] /. sol2[[1]];

Simplify[v[x, t]]

[Out]

Output from initial PDE Solution

[In] Animate[Plot[v[x, t], {x, 0, 10}, PlotRange -> {0, 1}],{t,0,5,0.1},AnimationRunning -> False] [Out] [Initial frame of animation showing function]([https://i.stack.imgur.com/kirYV.png] Next frame of animation with shifted window and no function

'''

0

There are 0 best solutions below