Mathematica Ndsolve periodic boundary conditions

  • #1
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
 

Answers and Replies

  • #2
18,263
7,944
Thanks for the post! This is an automated courtesy bump. Sorry you aren't generating responses at the moment. Do you have any further information, come to any new conclusions or is it possible to reword the post?
 

Related Threads on Mathematica Ndsolve periodic boundary conditions

Replies
3
Views
4K
Replies
6
Views
1K
  • Last Post
Replies
1
Views
7K
  • Last Post
Replies
3
Views
2K
Replies
8
Views
8K
Replies
2
Views
2K
Replies
3
Views
1K
Replies
8
Views
4K
Replies
4
Views
5K
Top