Message Boards Message Boards

0
|
6973 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Differential equation with Abs and nonlinearity

Posted 10 years ago

Hi, I am reading a book about optics. I tried to solve the following differential equation using Mathematica. For some reason, it didn't work. It seems that the solver can't handle the absolute value of a complex variable in a differential equation. it would helpful, if I get a possible solution. Thanks.

NDSolve[I D[u[\[Xi], \[Tau]], \[Xi]] + 1/2 D[u[\[Xi], \[Tau]], {\[Tau], 2}] + 
         Abs[u[\[Xi], \[Tau]]]^2 u[\[Xi], \[Tau]] == 0, u, {\[Xi], 0, 10}, {\[Tau], 0, 10}] 
POSTED BY: Saf Al
2 Replies

Mathematica NDSolve does not solve with non-linear coefficients. The parsing error seems to be related to Abs use only

Remove the Abs and you'll see the real issue

NDSolve[
  I D[u[x, t], x] + 1/2 D[u[x, t], {t, 2}] + u[x, t]^3 == 0, u, {x, 0, 10}, {t, 0, 10}]
 NDSolve::femnonlinear: Nonlinear coefficients are not supported in this version of NDSolve. >>

ps. you also missing initial/boundary conditions. This error was seen here also

POSTED BY: Nasser M. Abbasi
Posted 10 years ago

I see. Thanks for the reply.

POSTED BY: Saf Al
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract