# Solving a system of equations and differential equations

I have the following system:

$$f(t) = t \cdot f(t) + g(t)$$ $$g'(t) = g(t) + t \cdot g'(t) + f(t)$$

which I want to solve for $f(t)$ and $g(t)$. I also have initial conditions that $f(0)=g(0)=1$. How do I go about this in the best way?

-
Do you want the first equation to have $f'(t)$ on the left hand side? – ronno Oct 28 '12 at 9:24
No it is actually a system with an ordinary equation, and a differential equation. – Marián Khalid Oct 28 '12 at 9:25

From the first equation, $$g(t)=(1-t)f(t)\Rightarrow g^{\prime}(t)=(1-t)f^\prime (t)-f(t)$$Now from the second, $$(1-t)g^\prime (t)=g(t)+f(t)\Rightarrow (1-t)^2f^\prime (t)-(1-t)f(t)=(1-t)f(t)+f(t)$$ So we have$$(1-t)^2f^\prime (t)=(3-2t)f(t)$$ Hence $$\frac{f^\prime (t)}{f(t)}=\frac{3-2t}{(1-t)^2}$$ Now integrate both sides to get, $$\ln (f(t))=\int\frac{3-2t}{(1-t)^2}dt+C=\int \frac{1+2(1-t)}{1-t}dt+C=-\ln (1-t)+2t+C$$ and now using initial condition, $C=0.$ Hence, $$f(t)=\frac{e^{2t}}{1-t}\mbox{ and }g(t)=e^{2t}$$
I tried evaluating the last part, and applying the initial condition, but this gives me that $f(t) = \exp(-1/(t-1)-2 \cdot \ln(t-1)+(2\ln(-1) - 1))$. Then I tried solving the system in Maple, which gives me a different result, namely: $f(t) = \exp(-1/(t-1))/(\exp(1) \cdot (t-1)^2)$. – Marián Khalid Oct 28 '12 at 9:37
I have completeded the answer and I think these $f$ and $g$ satisfy all your conditions – pritam Oct 28 '12 at 9:56
As far as I can see, the solution does not satisfy the last condition. I get that $2 \exp(2t) = \exp(2t) + 2t\exp(2t) + \exp(2t)/(1-t)$, which is only true for $t=0$ and $t=\frac32$. – Marián Khalid Oct 28 '12 at 10:23
You are correct, then this should imply that there are no such $f$ and $g$ ! Have you checked whether the soloution given by Maple satisfy all the two conditions ? or may be I am missing something. – pritam Oct 28 '12 at 11:05
The solution from Maple do in fact satisfy the conditions. My Maple solutions are: $f(t)=\exp(-1/(t-1))/(\exp(1) \cdot (-1+t)^2)$ and $g(t) = -\exp(-1/(t-1))/(\exp(1) \cdot (-1+t))$. – Marián Khalid Oct 29 '12 at 1:07