0
$\begingroup$

I have a sequence of differential equations, which can be solved recursively, i.e, the solution of the first equation is necessary to solve the second equation.

Consider for example

$\frac{\partial}{\partial s}(\frac{1}{\epsilon^2}I_{-2}+\frac{1}{\epsilon} I_{-1} +I_0)=\frac{1}{\epsilon^2}f_0I_{-2}+\frac{1}{\epsilon}(f_0I_{-1}+f_1I_{-2})+(I_{-1}f_0+I_0f_1)$

Where $f_0\; \text{and}\; f_1$ are provided. The differential equations we will get from here are

$\frac{\partial}{\partial s}I_{-2}=f_0I_{-2}$

$\frac{\partial}{\partial s}I_{-1}=f_0I_{-1}+f_1I_{-2}$

and so on.

Is there any hope for solving these type of problem in mathematica? I could not try anything so far.

$\endgroup$
1
  • $\begingroup$ I{-1]'==f0 I[-1]+ f1 I[-2] and I[0]'== f1 I[0]+f0 I[-1] seems to be inconsiistent $\endgroup$ Commented Jul 9, 2023 at 18:59

2 Answers 2

1
$\begingroup$

This is not a recursive system of equations. It is a triangular one. Supposing we have to consider initial conditions as I2[0], I1[0], I0[0] and using the Laplace transform

sol = Solve[{LaplaceTransform[D[1/e^2 I2[s] + 1/e I1[s] + I0[s], s] - 1/e (f0 I1[s] + f1 I2[s]) - (f0 I1[s] + f1 I0[s]), s, z] == 0,
             LaplaceTransform[D[I2[s], s] - f0 I2[s], s, z] == 0,
             LaplaceTransform[D[I1[s], s] - f0 I1[s] - f1 I2[s], s, z] == 0},    
            {LaplaceTransform[I2[s], s, z], 
             LaplaceTransform[I1[s], s, z], 
             LaplaceTransform[I0[s], s, z]}][[1]]

InverseLaplaceTransform[{
             LaplaceTransform[I2[s], s, z], 
             LaplaceTransform[I1[s], s, z], 
             LaplaceTransform[I0[s], s, z]} /. sol, z, s]
$\endgroup$
0
$\begingroup$

I changed the variables from {I[-2],I[-1],I[0]} to {y[0],y[1],y[2]}, mainly to avoid having to deal with minus signs in the variable names. If you only have the three terms to deal with:

y0 = 
 First[y[0][t] /. 
   DSolve[Derivative[1][y[0]][t] == f[0] y[0][t], y[0][t], t]]

Out[10]= E^(t f[0]) C[1]

y1 = 
 First[y[1][t] /. 
   DSolve[Derivative[1][y[1]][t] == f[0] y[1][t] + f[1] y0, y[1][t], 
    t]]

Out[11]= E^(t f[0]) C[2] + E^(t f[0]) t C[1] f[1]

And for your missing "and so on" equation, assuming I didn't screw this up (f0 and f1 seem reversed here, as noted in the comment, compared to the previous two equations):

y2 = 
 First[y[2][t] /. 
   DSolve[Derivative[1][y[2]][t] == f[0] y1 + f[1] y[2][t], y[2][t], 
    t]]

Out[13]= 
E^(t f[1]) C[3] + (
 E^(t (f[0] - f[1]) + t f[1])
   f[0] (C[2] (f[0] - f[1]) + C[1] (-1 + t (f[0] - f[1])) f[1]))/(f[
    0] - f[1])^2
$\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.