4
$\begingroup$

I see that in the official documentation, there are only instructions for the first or second boundary value problems.

$\frac{\partial w}{\partial t}=a \frac{\partial^2 w}{\partial x^2}+\Phi(x, t)$ with Domain: $0 \leq x<\infty$. Third boundary value problem. The following conditions are prescribed: $$ \begin{array}{rlll} &w=f(x) &\text { at } t=0 \text { (initial condition), } \\ &\partial_x w-k w =g(t) \quad &\text { at } x=0 \text { (boundary condition). } \end{array} $$

Although the textbook provides the Green Function for this problem, I still want to know if Mathematica can solve this problem on its own?

For information on this issue in the textbook, please refer to the link: https://ibb.co/HV2JnS2

enter image description here

$\endgroup$
3
  • 1
    $\begingroup$ Could you please provide the exact equation you are trying to solve with these boundary conditions please? $\endgroup$
    – chris
    Commented Apr 11 at 6:38
  • $\begingroup$ @chris I have already made the modification, please refer to it. The main complexity lies in $\Phi(x,t)$. However, my current issue is whether Mathematica can automatically provide the Green function for the third type of boundary? $\endgroup$ Commented Apr 11 at 7:07
  • $\begingroup$ @user21 would probably know the answer to this generic question? $\endgroup$
    – chris
    Commented Apr 11 at 8:05

1 Answer 1

4
$\begingroup$

Not an answer but a comment. One can use mathematica to check that the solution provided from the PDF works.

Let us define

G[x_, \[Xi]_, t_] = 
 1/2/Sqrt[Pi  a  t] (Exp[-(x - \[Xi])^2/4/a/t] + 
    Exp[-(x + \[Xi])^2/4/a/t] - 
    2  k  Integrate[
      Exp[-(x + \[Xi] + \[Eta])^2/4/a/t - k  \[Eta] ], {\[Eta], 0, 
       Infinity}, GenerateConditions -> False])

enter image description here

We check that it satisfies the boundary conditions.

D[G[x, \[Xi], t], t] - a  D[G[x, \[Xi], t], x, x] // FullSimplify

(* 0 *)

D[G[x, \[Xi], t], x] - k  G[x, \[Xi], t] /. x -> 0 // FullSimplify

(*  0  *)

Now the full solution with a left hand side should be

ws[x_, t_] = 
 Integrate[f[\[Xi]] G[x, \[Xi], t], {\[Xi], 0, Infinity}] - 
  a  Integrate[g[\[Tau]] G[x, 0, t - \[Tau]], {\[Tau], 0, t}] + 
  Inactive@
   Integrate[\[CapitalPhi][x, \[Tau]] G[x, \[Xi], 
      t - \[Tau]], {\[Tau], 0, t},
    {\[Xi], 0, Infinity}]

enter image description here

Let us define the PDE it is supposed to satisfy

eqn = D[G[x, \[Xi], t], t] - 
   a  D[G[x, \[Xi], t], x, x] - \[CapitalPhi][x, t];

Indeed

eqn /. w -> Function[{x, t}, ws[x, t] // Rest // Evaluate] // Simplify

(* -[CapitalPhi](x,t) *)

Which may look incorrect at first but just reflects that the first term, if active, would actually return \[CapitalPhi](x,t) so that it cancels out to zero.

As a complement you might want to look at this answer

$\endgroup$
4
  • $\begingroup$ Thank you very much for your response. I have a fundamental question. Please see my revised question: I want to reproduce a semi-analytical form from an article. Can Mathematica solve the recursive integral form of the PDE $U_0$ for the standard B-S lookback option?(I found it almost impossible to solve the integral directly using Mathematica.) $\endgroup$ Commented Apr 12 at 3:17
  • $\begingroup$ @YilinCheng The problem in the update is rather different from the original, please avoid asking distinctly different questions in one post, consider asking a new question. $\endgroup$
    – xzczd
    Commented Apr 12 at 3:29
  • $\begingroup$ @xzczd Thanks, I will add a new question. $\endgroup$ Commented Apr 12 at 3:32
  • $\begingroup$ @chris Thanks, If you have any ideas for a follow-up question, I would greatly appreciate it. mathematica.stackexchange.com/q/301776/94893 $\endgroup$ Commented Apr 12 at 3:42

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.