The same system without the four initial conditions takes barely any time.
It has nothing to do with IC. It is FullSimplify
which takes very long time. Try
Timing[DSolveValue[{OdeM, OdeP, Ic1, Ic2, Ic3, Ic4}, {V1[x], V2[x]},
x]]
On my PC, V 13.2.1 it takes 4.5 seconds
ps. I renamed your σX^2 to $w$. As I mentioned in your other question wrong-sign-in-variation-of-parameters-method , it is bad idea to use two letters for one variable. Why do you insist in using σX for a variable instead of say w
or any other single letter?
Any way, it is well known that FullSimplify
can slow things alot as it triedtries many types of simplifications. Try to use it only if needed. Simplify
is much faster than FullSimplify
Full code
OdeM = 1/2*w^2*V1''[x] + ((a0*δ)/a1 - a1*x)*V1'[x] -
em*V1[x] == -((2*x - 2*ep*(a0 + a1*x)*λ)/(em - ep));
OdeP = 1/2*w^2*V2''[x] + ((a0*δ)/a1 - a1*x)*V2'[x] -
ep*V2[x] == -((-2*x + 2*em*(a0 + a1*x)*λ)/(em - ep));
Ic1 = em*V1[xhat] + ep*V2[xhat] == 0;
Ic2 = em*V1'[xhat] + ep*V2'[xhat] == 0;
Ic3 = V1[xhat] + V2[xhat] == (2*θ)/((ϵ - 1) (1 + φ))*xhat;
Ic4 = V1'[xhat] + V2'[xhat] == (2*θ)/((ϵ - 1) (1 + φ));
Timing[DSolveValue[{OdeM, OdeP, Ic1, Ic2, Ic3, Ic4}, {V1[x], V2[x]}, x]]