Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

how can i solve this equation in mathematica? this is sine-gordon eq. but the boundary condition can not recognized by mathematica . thank you for you attention.

NDSolve[{∂_(x,x) F[t,x]==(1-ζ)(Sin[F[t,x]]+β∂_t F[t,x]+∂_(t,t) F[t,x]),...
(∂_x F[t,x]==∂_t  F[t,x]/.x→0),(∂_x F[t,x]==∂_t F[t,x]/.x→1)},F,{t,0,10},{x,0,1}]

Edit:

\[Beta] = 1;
\[Zeta] = 1;
NDSolve[
 {
  D[f[t, x], x, 
    x] == (1 - \[Zeta]) Sin[[t, x]] + \[Beta] D[f[t, x], t] + 
    D[f[t, x], t, t],
  D[f[t, 0], x] == D[f[t, 0], t],
  D[f[t, 1], x] == D[f[t, 1], t]

  },
 f,
 {t, 0, 10},
 {x, 0, 1}
 ]
share|improve this question

migrated from math.stackexchange.com Oct 19 '12 at 18:02

This question came from our site for people studying math at any level and professionals in related fields.

    
Try to solve an easier PDE first to get a grip on the syntax. –  belisarius Oct 19 '12 at 18:11
2  
your syntax is incorrect; try looking in the docs where they have examples of solving PDEs. –  acl Oct 19 '12 at 19:26
    
This is the Sine Gordon wave equation like you say. Check this out. Also, if you could correct your syntax you might have better luck... –  drN Oct 19 '12 at 20:09
    
I tried editting the equation. However, theres probably insufficient boundary condition and initial condition information to solve this. –  drN Oct 19 '12 at 21:37
add comment

1 Answer 1

As the comments say, you really have to learn correct syntax.

Set up Sine-Gordon equation with initial and boundary conditions:

eq = {D[u[t, x], {t, 2}] == Sin[u[t, x]] + D[u[t, x], {x, 2}], 
  u[0, x] == E^(-x^2), Derivative[1, 0][u][0, x] == 0, 
  u[t, -10] == u[t, 10]};

Solve it:

sol = NDSolve[eq, u, {t, 0, 30}, {x, -10, 10}];

Plot it:

Plot3D[Evaluate[u[t, x] /. sol], {t, 0, 20}, {x, -10, 10}, 
 PlotRange -> All, PlotStyle -> Directive[Specularity[White, 20], Opacity[0.8]], 
 ColorFunction -> "DarkRainbow", PlotPoints -> 50, MeshStyle -> Opacity[.5]]

enter image description here

share|improve this answer
    
Wow! I love this equation! –  drN Oct 19 '12 at 23:05
1  
Vitaliy: Your plot is (as usually) a piece of artwork. Have you written something about creating aesthetically pleasant graphs with Mma? (And if you haven't, could you?) –  belisarius Oct 19 '12 at 23:52
    
that's a great colour scheme –  acl Oct 20 '12 at 0:34
    
@belisarius thanks, i'm glad you guys like it. i have to find some time - but i'd really love to ;) –  Vitaliy Kaurov Oct 20 '12 at 4:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.