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

AI Thread Summary
Mathematica 10.02 struggles with solving partial differential equations (PDEs) when initial conditions include derivatives, leading to frequent error messages. Users report that while the code from a referenced book works in Mathematica 10.3 and later versions, it fails to produce solutions in 10.02. The notation for derivatives, such as Derivative[1,0], appears to be correct, yet DSolve often returns no answer, and NDSolve provides only partial solutions with warnings. Upgrading to Mathematica 12.0 resolves these issues, indicating a potential bug in version 10.02. Users are encouraged to verify their problems are well-posed and to consider updating their software for better functionality.
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
Views
2K
Replies
4
Views
3K
Replies
6
Views
2K
Replies
3
Views
5K
Replies
3
Views
8K
Replies
4
Views
3K
Back
Top