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.

I have a very simple example of a second order PDE:

eqn = D[u[x, y], x, y] + u[x, y] == 0;
sol = DSolve[eqn, u, {x, y}]

and Mathematica cannot solve it! What is wrong!?

share|improve this question
2  
In the tutorial on second-order PDE's it says "DSolve can find the general solution for a restricted type of homogeneous linear second-order PDEs..." Unfortunately this equation is not of that type (it has a non-vanishing non-principal part). So I don't think there's anything wrong as such, it's just that Mathematica can't solve this PDE. –  Simon Woods Mar 26 '13 at 20:48
add comment

1 Answer 1

When I run it Mathematica solves it perfectly well, but symbolically:

Clear[x, y, u] (* Just in case you have any of this predefined thereby confusing things *)

eqn = D[u[x, y], x, y] + u[x, y] == 0;
sol = DSolve[eqn, u, {x, y}]

enter image description here

Now this may not give you what you expected or wanted. So take a closer looks at your original code, to understand what may have gone wrong.

First -- Did you intend the Mathematica partial derivative function (D[]) to differentiate successively with respect to x and y? Alternatively you may have wanted something more like:

D[f,{x,n}]

which gives the multiple derivative.

Second -- Where you add u[x, y] to D[u[x, y], x, y], recognize that the x and y in u[x, y] (on the right of your + sign) are not the x and y in D[u[x, y], x, y]. D[] encapsulates the scope of the x and y. It doesn't reach beyond itself.

Three -- You use u[x, y] as a function both within D and in what you add to it, but you haven't either defined it prior or made it a pure function. As I don't know what you need to accomplish, I can't really comment further on this.

I hope this helps. Good luck.

share|improve this answer
1  
OPs equation looks like a 2D harmonic oscillator. Shouldnt the result simply be a two dimensional exponential? E.g $u(x,y)=exp(I(x+y))$ would be (one) solution to the above equation. –  A friendly helper Mar 26 '13 at 14:51
    
Nice to have a @Afriendlyhelper around... Welcome to the site. –  Jagra Mar 26 '13 at 15:27
1  
@Afriendlyhelper is correct, it's the non homogeneous 2D wave equation in a different coordinate system (make the change $\xi=x+y,\ \eta=x-y$ to get it).Now the PDE is linear so you can combine the homogeneous solution with a special solution of the non homogeneous one. A special case for it is the $\exp(x+y)$ so the general solution is $F(x)+G(y)+\exp(x+y)$. –  Spawn1701D Mar 26 '13 at 20:48
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.