# How to solve this partial differential equation with integral and complex value, which is the updated previous questions?

how to solve the PDE below? It is similar to previous ones I asked, but updated and simplified.

I am trying to solve the PDE equation D_t(wP+wL)=D_z(S)+wJ to obtain the temperature TeV(t,z) of plasma with non-uniform density n=n(z), which, however, only has initial temperature of TeV(0,z)=temp0. In this way, I tried to figure out another ic/bc by solving the plasma temperature at interface to obtain the boundary condition TeV(t,0)=TeV0(t).

I am NOT able to solve the equations because there are intergral and complex values parts involved. Could anyone help me out? Thanks a lot!

(******at interface, calculating boundary condition**********)
n0 = 10; B0 = 10; temp0 = 100; E0 = 0.01;
ν0[t_] := n0*TeV0[t]^(-3/2);
ϵ0[t_] := 1 - n0/(1 - B0 + I *ν0[t]);
ϵR0[t_] := 1 - (n0*(1 - B0))/((1 - B0)^2 + ν0[t]^2);
k0[t_] := (ϵ0[t])^(1/2);
η0[t_] := (n0*ν0[t])/((1 - B0)^2 + ν0[t]^2);

wP0[t_] := 3/2 n0*TeV0[t]/(511*10^3)
wL0[t_] := 1/2 (1 + ϵR0[t])*E0^2
DS0[t_] := E0^2*2 Im[k0[t]]
wJ0[t_] := 1/4 η0[t]*E0^2

pde = {D[wP0[t] + wL0[t], t] == DS0[t] + wJ0[t]};
ic = {TeV0[0] == temp0};
solT0 = NDSolveValue[{pde, ic}, TeV0, {t, 0, 10^9}]
TeV0[t_] := solT0[t]
Plot[TeV0[t], {t, 0, 10^6}, FrameLabel -> {"t", " T0 (eV)"}]

(******Inside, to solve TeV[t,z]**********)
n[z_] := n0*Exp[0.1*z];
ν[t_, z_] := n[z]*TeV[t, z]^(-3/2)
ϵ[t_, z_] := 1 - n[z]/(1 - B0 + I *ν[t, z]);
ϵR[t_, z_] := 1 - (n[z]*(1 - B0))/((1 - B0)^2 + ν[t, z]^2)(*Re(ϵ)*);
ϵI[t_, z_] := (n[z]*ν[t, z])/((1 - B0)^2 + ν[t, z]^2)(*Im(ϵ)*);
ϵ0[t_, z_] := (ϵR[t, z]^2 + ϵI[t, z]^2)^(1/2)(*Abs(ϵ)*);
ϕϵ[t_, z_] := ArcTan[ϵI[t, z]/ϵR[t, z]] (*ϵ=ϵ0*exp(i\[Phi]ϵ)*)

k[t_, z_] := (ϵ[t, z])^(1/2);
kR[t_, z_] := ϵ0[t, z]^(1/2) Cos[ϕϵ[t, z]/2](*kR=Re(k)*);
kI[t_, z_] := ϵ0[t, z]^(1/2) Sin[ϕϵ[t, z]/2](*kI=Im(k)*);

η[t_, z_] := (2 ν[t, z])/((1 - B0)^2 + ν[t, z]^2)

fun[t_?NumericQ, z_?NumericQ] := NIntegrate[-2*kI[t, z1], {z1, 0, z}]
E2[t_, z_] := E0^2/ϵ0[t, z]^(1/2) Exp[fun[t, z]]

wP[t_, z_] := 3/2 n[z]*TeV[t, z]/(511*10^3);
wL[t_, z_] := 1/2 (ϵ0[t, z] + ϵR[t, z])*E2[t, z];
S[t_, z_] := 1/2 kR[t, z]*E2[t, z];
DS[t_, z_] := D[S[t, z], z]
wJ[t_, z_] := 1/4 n[z]*η[t, z]*E2[t, z]

pde = {D[wP[t, z] + wL[t, z], t] == DS[t, z] + wJ[t, z]};
ic = {TeV[0, z] == temp0};
bc = {TeV[t, 0] == TeV0[t]};
solT1 = NDSolveValue[{pde, ic, bc}, TeV, {t, 0, 10^8}, {z, 0, 10^5}]
TeV1[t, z] := solT1[t][z]
Plot[{TeV1[10^3, z], TeV1[10^6, z]}, {z, 0, 10^2},
FrameLabel -> {"z", " T1(eV)"}]

• This pde is fundamentally different from the ones I helped you solve in your earlier question, mathematica.stackexchange.com/a/302679/1063. To solve the present pde, i recommend trying the methods used in the answers in mathematica.stackexchange.com/q/175080/1063. Commented May 5 at 13:46
• Are you still interested in an answer to this question? If so, I may have time to help in the next few days. Also, if you found my answer to your earlier question to be helpful, please accept it. Thanks. Commented May 7 at 12:34
• Yes, I am still VERY interested in the urgent question. I am studying on your helpful suggestions, but not solved yet.... Commented May 8 at 4:37
• @bbgodfrey It looks a little complicated to me. Commented May 10 at 12:25
• Are you confident that the equations used to compute TeV0 are correct? Although I have not yet been able to answer your question, I have found that the solution will be sensitive to the choice of TeV0. Commented May 12 at 12:37