- #1
innocent
- 1
- 0
Hello,
Mathematica is very new to me. Please help.
n=1,2,3...,10 and stepsize between n(2)-n(1)=0.1
It is periodic. I mean n(11)=n(1). i have a initial function which depends on n
and i want to solve this equation by NDsolve like that
u[n, t = 0] == 1/(2*n + 1)
Do [ u[n, 0], {n, 0, 10, 0.1}] %
u[n + 1, t] == u[1, t]
u [n,t]== u[0,t]
s == NDsolve [
D [u[n, t]] == -[u[n + 1, t] + u[n - 1, t]] - [[u[n, t]]^3], ,
u[n, t == 0], u, {n, 0, 10}, {t, 0, 5}]
Plot3D [s, {n, 0, 10}, {t, 0, 5}]but it doesn't work.
Thank you so much
Mathematica is very new to me. Please help.
n=1,2,3...,10 and stepsize between n(2)-n(1)=0.1
It is periodic. I mean n(11)=n(1). i have a initial function which depends on n
and i want to solve this equation by NDsolve like that
u[n, t = 0] == 1/(2*n + 1)
Do [ u[n, 0], {n, 0, 10, 0.1}] %
u[n + 1, t] == u[1, t]
u [n,t]== u[0,t]
s == NDsolve [
D [u[n, t]] == -[u[n + 1, t] + u[n - 1, t]] - [[u[n, t]]^3], ,
u[n, t == 0], u, {n, 0, 10}, {t, 0, 5}]
Plot3D [s, {n, 0, 10}, {t, 0, 5}]but it doesn't work.
Thank you so much