Mathematica bug? (Solving PDEs when the initial conditions contain a derivative)

In summary, the book's examples work well with Mathematica 10.02, but when I try to solve the same problems with Mathematica 12.0, I get errors. I am not sure what is going on.
  • #1
zoltrix
70
7
hello

I own mathematica 10.02

it is virtually impossible to solve PDE's ,even with NDSolve,if the initial conditions contain a derivative
I write

Derivative[1,0] [0,x] == f[x]

I mean
the first t derivative of u[t,x] for x at t=0 is f[x]

I own a book based on Mathematica 10.3
Even if a carefully copy its examples I alwayes get error messages
Is it a mathematica 10.02 bug ? or what else ?
 
Last edited:
Physics news on Phys.org
  • #2
What error do you get?

Is your problem well-posed? Does it have a unique solution given the initial and boundary conditions?
 
  • #3
hello

I own the book "mathematica and differential equations" by marian Muresan
I suppose that the problems are well posed and that they have an unique solutions

The author use the "superscript" notation for derivative but I get an error message
so I use the notation

Derivative[1,0] [0,x]

apparently it is correct since it matches the author's " superscript" notation but

DSolve never return any answer
NDSolve sometimes works sometimes it does not
of course the solutions of the equations provided by the book are correct


I have mathematica 10.02 while the author used Mathematica 10.3
 
  • #4
 
  • #5
hello

Please have a look at the attached file

1) it is the original code of the book , delivering the correct solution
If I copy it, I get the error message
2) I replace the derivative in the initial condition
no answer from DSolve
3) Same as 2) but NDSolve
I get a partially correct solution
see the warning message

can you figure out what is going on ?
zoltrix said:
hello

probably it is a mathematica 10.02 bug which has been fixed in version 10.3
I down loaded mathematica 12.0 trial version
the examples from the book work well
 
  • #6
zoltrix said:
Please have a look at the attached file
There is no file.

Can you copy and paste the code, within code tags?
 
  • #7
hello

Mathematica 10.02 does not answer with DSolve and I get a "warning" with NDSolve
Mathematica 12.0 works flawlessy
 

Attachments

  • example.pdf
    19.8 KB · Views: 187
  • #8
This is too hard to work with. If you copy and paste into your post, I can myself copy and paste into Mathematica.
 
  • #9
a = 2; l = 2 π; c = 5; b = 2; h = 5;

f[x_] := Piecewise[{{h / (l - b) (x + l), -l ≤ x ≤ -b}, {h, -b ≤ x ≤ b}, {h / (l - b) (l - x), b ≤ x ≤ l}}]
g[x_] := Exp[-x^2]

eqncond = {∂t,t u[t, x] == a^2 ∂x,x u[t, x], u[0, x] == f[x], Derivative[1, 0][0, x] == g[x]};

sol = DSolve[eqncond, u, {t, x}] // Flatten
 

FAQ: Mathematica bug? (Solving PDEs when the initial conditions contain a derivative)

1. What is a "Mathematica bug"?

A "Mathematica bug" refers to a programming error or flaw in the Mathematica software that causes unexpected or incorrect results when solving differential equations, particularly those involving initial conditions with derivatives.

2. How common is the "Mathematica bug" when solving PDEs with initial conditions containing derivatives?

The "Mathematica bug" is not a common occurrence and is often specific to certain types of PDEs and initial conditions. However, it has been reported by some Mathematica users and has been acknowledged by the developers of the software.

3. What causes the "Mathematica bug" when solving PDEs with initial conditions containing derivatives?

The "Mathematica bug" is caused by a limitation in the algorithms used by Mathematica to solve certain types of PDEs. Specifically, it occurs when the initial conditions involve derivatives that are not continuous at the boundary of the domain being solved.

4. How can I avoid encountering the "Mathematica bug"?

One way to avoid the "Mathematica bug" is to carefully check your initial conditions and make sure they are well-defined and continuous at the boundary. Additionally, you can try using alternative methods for solving PDEs in Mathematica or consult the Mathematica community for potential workarounds.

5. Is there a way to fix the "Mathematica bug"?

The "Mathematica bug" is a known issue and has been addressed by the developers in newer versions of the software. If you encounter this bug, you can try updating to the latest version of Mathematica or contact the developers for assistance in resolving the issue.

Similar threads

Replies
1
Views
1K
Replies
4
Views
2K
Replies
6
Views
2K
Replies
1
Views
2K
Replies
4
Views
5K
Replies
4
Views
7K
Replies
14
Views
8K
Back
Top