3
$\begingroup$

In my project I need to solve following equation analytically could anyone help me ? As I read the other questions, my equation seems like Helmholtz equation $$ \triangledown^2 u(x,y) - k_cu(x,y) =0 \quad x,y \in \Omega \\ u(x,L) = u(x,0), u(0,y) = 1 \quad x \in [0,L] , y \in [0,L] $$

here is my code in Mathematica

Dc = 1460
Kc = 9.41/(10^2)
 LaplacEquation =  Dc*D[u[x, y], {x, 2}] + Dc* D[u[x, y], {y, 2}] - Kc*u[x, y] == 0
  DSolve[LaplacEquation, {u[x, y], u[x, y]}, {x, y}]
$\endgroup$
5
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$
    – Michael E2
    Jul 20, 2016 at 16:23
  • $\begingroup$ Just to clarify, you wish to solve this with the computer algebra software Mathematica? Have you tried DSolve[]? -- OTOH, if it is just a mathematics question, the site math.stackexchange.com is more appropriate. $\endgroup$
    – Michael E2
    Jul 20, 2016 at 16:25
  • $\begingroup$ @MichaelE2 thank you for your answer. Yes I want to solve it using Mathematica. I also tried DSolve[] but because non principal part $k_cu(x,y)$ DSolve[] could not find the answer $\endgroup$ Jul 20, 2016 at 16:37
  • $\begingroup$ Could you post the code for what you tried? $\endgroup$
    – Feyre
    Jul 20, 2016 at 16:43
  • $\begingroup$ @MichaelE2 I have edited my post and added my code $\endgroup$ Jul 20, 2016 at 17:04

2 Answers 2

3
$\begingroup$

This is a solution to the problem with exactly the boundary conditions as stated:

Dc = 1460
Kc = 9.41/(10^2)
LaplacEquation = 
 Dc*D[u[x, y], {x, 2}] + Dc*D[u[x, y], {y, 2}] - Kc*u[x, y] == 0

v[x] /. 
 First[DSolve[{LaplacEquation /. u -> (v[#] &), v[0] == 1}, v[x], x]]

(* ==> E^(-0.0080282 x) (1. - 1. C[1] + E^(0.0160564 x) C[1]) *)

All I did here is observe that the boundary conditions can be satisfied if the solution has no dependence on y whatsoever. I then inserted that assumption into the Laplacian in the form of a replacement u -> (v[#]&) which states that the new function v depends only on x.

$\endgroup$
2
$\begingroup$

DSolve has limited abilities with PDEs. I can get part way there, maybe, but something is fishy about the result Mathematica returns.

First, since your equation is linear and homogeneous and has a simple relationship among the coefficients, we can rewrite it as a BVP over a unit square: $$\nabla^2u + a\, u=0, u(x,0)=u(x,1),\ u(0,y)=1$$ It is apparently still too general for DSolve to handle, but if we impose further boundary constraints, namely, $$u(x,0)=u(x,1)=u(0,y)=u(1,y)=1\,,$$ we can get a solution for various values of a, similar to the Helmholtz example in the docs for DSolve. Luckily, the dependence on a is "obvious," and we can get an expression in terms of a:

pde = a * u[x, y] + Laplacian[u[x, y], {x, y}] == 0;
bcs = {u[x, 0] == 1, u[x, 1] == 1, u[0, y] == 1, u[1, y] == 1};
Block[{a = 5},
  {dsol0} = DSolve[{pde, bcs}, u, {x, y}]
  ];
dsol = dsol0 /. {5 -> a, -5 -> -a};
u[x, y] /. dsol // TraditionalForm

Mathematica graphics

If you doubt it, you can try other values of a:

Block[{a = 167},
  DSolve[{pde, bcs}, u[x, y], {x, y}]
  ] // TraditionalForm

Mathematica graphics

There are a couple of problems. Numerically this is hard to evaluate, so checking it is difficult. And it does not look symmetric in x and y, even though the problem is. (Maybe someone will recognize this as a common sum, but for me, it would take more time than I can give at the moment. It's not a sum Mathematica can do.)

This is the best I can do.
My reformulation has more restrictive boundary conditions than the OP's, and in my mind there is some doubt whether the solution is correct. But maybe it will help the OP.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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