# Solving a coupled system of ODEs

I have two coupled ODEs for $$T(x)$$ and $$t(x)$$:

$$\frac{d^2 T}{d x^2}-\beta (T-t)+K=0 \tag 1$$

$$\frac{d t}{dx}-\alpha(T-t)=0 \tag 2$$

$$\alpha, \beta$$ and $$K$$ are constants $$>0$$. Also, it is known that $$t(x=0)=t_i$$. Additionally, for $$(1)$$ we know:

$$\frac{d T(x=0)}{d x}=\frac{d T(x=L)}{d x} = 0$$

The mathematica code I use is:

ode1 = D[T[x], x, x] - β (T[x] - t[x]) + K == 0

ode2 = D[t[x], x] - α (T[x] - t[x]) == 0

sol1 = DSolve[{ode1, D[T, x] = 0, D[T[L], x] = 0}, T[x], x]



On executing the third command i.e. DSolve I get an error like:

DSolve::deqn: Equation or list of equations expected instead of True in the first argument {K-β (-t[x]+T[x])+(T^′′)[x]==0,True,True}.


How can I get a symbolic solution to this coupled system ?

Add the second ode2 and you need == instead of = to define the boundary conditions T' == 0, T'[L] == 0 .
sol1 = DSolve[{ode1, ode2, T' == 0, T'[L] == 0}, {T, t}, x]

• Thanks ! I did not forget the second ODE but was planning to use the solution of the first to solve the second. I wasn't aware that two ODEs can be simultaneously given as an input to DSolve. I should have gone through the documentation more diligently. Coming to the solution, it has an undetermined constant c1, which I think can be resolved using the b.c. on $t$ i.e. $t(x=0)=0$ (I am considering $t_i=0$). So I used an additional term t=0 and found an exact solution with no constants – Indrasis Mitra Aug 19 at 6:45