0
$\begingroup$

I try to solve integro-differential equation for a function of two variables, where the initial conditions are given with f[s,s]==1. Mathematica does not like such an initial condition, as I get an error "The arguments should be ordered consistently". How can I solve this?

This is my code:

omega = 1;
g = 1;
alpha[t_, s_] := Exp[-(t - s)];
fsol = NDSolveValue[{D[f[t, s], 
     t] == (I*omega + g^2*Integrate[alpha[t, s]*f[t, s], {s, 0, t}])*
     f[t, s], f[s, s] == 1}, f, {t, 0, 10}, {s, 0, 10}] 
$\endgroup$
5
  • $\begingroup$ You can't have f[t, s] and also f[s, s] at same time. What does this mean as initial conditions? $\endgroup$
    – Nasser
    Jul 23, 2019 at 7:59
  • 1
    $\begingroup$ The meaning is: for all s, f[t=s,s]==1, so when both t and s have the same value function f gives 1. $\endgroup$
    – Agnieszka
    Jul 23, 2019 at 8:06
  • $\begingroup$ I have never seen such an initial conditions in all my life. What is this called? Initial condition, the way I understand it, is: At a particular instance of time say $t_0$, the solution should be some value say $f_0$. But may be someone else knows about this special initial condition and hopefully can better help. $\endgroup$
    – Nasser
    Jul 23, 2019 at 8:18
  • $\begingroup$ Hm, I don't know if there is any special name for it. $\endgroup$
    – Agnieszka
    Jul 23, 2019 at 8:21
  • $\begingroup$ @Nasser What about DirichletCondition[f[t, s] == 1, t == s]? Or rotate the coordinate system by 45 degrees (thinking of t and s formally as spatial coordinates), so that $t=s$ becomes $t'=0$? $\endgroup$
    – Michael E2
    Jul 23, 2019 at 16:43

1 Answer 1

2
$\begingroup$

Expanding the differential equation for small $t$, and solving it term by term, reveals a pattern: the solution factorises: $f(t,s)=F(t)/F(s)$. Plugging this into the PDE yields an ODE, whose solution is $$ f(t,s)=\frac{\left(\sqrt{-4-2 i} e^{\sqrt{-4-2 i} s}+(-3+i)+2 \sqrt{1-2 i}\right) e^\left(\left(\frac{1}{2}+\frac{i}{2}\right) \left(-1+\sqrt{-1+2 i}\right) (s-t)\right)}{\sqrt{-4-2 i} e^{\sqrt{-4-2 i} t}+(-3+i)+2 \sqrt{1-2 i}} $$

Indeed,

{D[f[t, s], t] == (I*omega + g^2*Integrate[alpha[t, q]*f[t, q], {q, 0, t}])*f[t, s], f[s, s] == 1} /. f -> ((E^(((1/2 + I/2) ((1 - I) Sqrt[-2 - I] + Sqrt[2]) (#1 - #2))/Sqrt[2]) ((-3 + I) + 2 Sqrt[1 - 2 I] + Sqrt[-4 - 2 I] E^(Sqrt[-4 - 2 I] #2)))/((-3 + I) + 2 Sqrt[1 - 2 I] + Sqrt[-4 - 2 I] E^(Sqrt[-4 - 2 I] #1)) &) // FullSimplify

(* {True, True} *)
$\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.