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

Click For Summary
SUMMARY

The discussion centers on issues encountered while solving partial differential equations (PDEs) using Mathematica 10.02, particularly when initial conditions involve derivatives. Users report that the syntax for derivatives, such as using Derivative[1,0][0,x], leads to errors in DSolve and inconsistent results with NDSolve. It is concluded that these problems are likely due to a bug in Mathematica 10.02, as solutions work correctly in Mathematica 12.0. Users are encouraged to upgrade to version 10.3 or later for improved functionality.

PREREQUISITES
  • Familiarity with Mathematica syntax and functions, specifically DSolve and NDSolve.
  • Understanding of partial differential equations and their initial conditions.
  • Knowledge of derivative notation in Mathematica, including superscript and Derivative functions.
  • Basic proficiency in using Mathematica for mathematical modeling and problem-solving.
NEXT STEPS
  • Upgrade to Mathematica 10.3 or later to resolve existing bugs.
  • Explore the differences in syntax and functionality between Mathematica 10.02 and 12.0.
  • Research best practices for defining initial conditions in PDEs using Mathematica.
  • Learn about alternative methods for solving PDEs in Mathematica, such as using the Function or Module constructs.
USEFUL FOR

This discussion is beneficial for mathematicians, engineers, and researchers working with Mathematica for solving PDEs, particularly those experiencing issues with earlier versions of the software.

zoltrix
Messages
85
Reaction score
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
What error do you get?

Is your problem well-posed? Does it have a unique solution given the initial and boundary conditions?
 
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
 
 
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
 
zoltrix said:
Please have a look at the attached file
There is no file.

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

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

Attachments

This is too hard to work with. If you copy and paste into your post, I can myself copy and paste into Mathematica.
 
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
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 3 ·
Replies
3
Views
8K
  • · Replies 14 ·
Replies
14
Views
9K
  • · Replies 4 ·
Replies
4
Views
3K