# Linear first-order differential equation with an initial condition

• Lambda96
In summary, pasmith and vela were able to help me calculate the derivative of the equation, but I still have problems with the second term.
Lambda96
Homework Statement
Show that the solution of a linear differential equation with boundary condition ##f(0)=f_0## has the following form ##f(x)=f_0 exp\biggl( \int_{0}^{x}ds ~g(s) \biggr)+\int_{0}^{x}ds ~h(s)exp\biggl( \int_{s}^{x}dr ~g(r)\biggr)##
Relevant Equations
none
Hi,

unfortunately I have problems with the task d and e, the complete task is as follows:

I tried to form the derivative of the equation ##f(x)##, but unfortunately I have problems with the second part, which is why I only got the following.

$$\frac{d f(x)}{dx}=f_0 g(x) \ exp\biggl( \int_{0}^{x}ds \ g(s) \biggr)+?$$

I then tried another approach and first wanted to get rid of the integrals in the exp terms

$$f_0 exp\biggl( G(x)-G(0) \biggr)+\int_{0}^{x}ds \ h(s) exp \biggl( G(x)-G(s) \biggr) f(x)dx$$
$$f_0 e^{G(x)-G(0)}+e^{G(x)}\int_{0}^{x}ds \ h(s) e^{-G(s)}$$

Unfortunately, I now have problems again with the derivative for the second term using this method.

You have an expression of the form $$\int_a^x f(x,t)\,dt$$ for which you can show from the limit definition that, for sufficiently smooth $f$, $$\frac{d}{dx} \int_a^x f(x,t)\,dt = \lim_{h \to 0} \frac 1h \left( \int_a^{x+h} f(x+h, t)\,dt - \int_a^x f(x,t)\,dt\right) = f(x,x) + \int_a^x \left.\frac{\partial f}{\partial x}\right|_{(x,t)}\,dt.$$

DeBangis21 and Lambda96
Thanks pasmith for your help , I tried to implement your tip but am not sure about the ##f(x,x)## term:

I have now calculated the following

$$\frac{d f(x)}{dx}=\frac{d}{dx}\biggl( f_0 \ exp\Bigl( \int_{0}^{x}ds \ g(s) \Bigr) +\int_{0}^{x}ds \ h(s) \ exp\Bigl( \int_{s}^{x}dr \ g(r) \Bigr) \biggr)$$

$$\frac{d f(x)}{dx}= f_0 \ exp\Bigl( \int_{0}^{x}ds \ g(s) \Bigr) g(x) + h(x)exp\Bigl( \int_{s}^{x}dr \ g(r) \Bigr)+\int_{0}^{x}ds \ h(s) \frac{d}{dx} \ exp\Bigl( \int_{s}^{x}dr \ g(r) \Bigr)$$

$$\frac{d f(x)}{dx}= f_0 \ exp\Bigl( \int_{0}^{x}ds \ g(s) \Bigr) g(x) + h(x)exp\Bigl( \int_{s}^{x}dr \ g(r) \Bigr)+\int_{0}^{x}ds \ h(s) exp\Bigl( \int_{s}^{x}dr \ g(r) \Bigr)g(x)$$

$$\frac{d f(x)}{dx}= f_0 \ exp\Bigl( \int_{0}^{x}ds \ g(s) \Bigr) g(x) + h(x)exp\Bigl( \int_{s}^{x}dr \ g(r) \Bigr)+\int_{0}^{x}ds \ h(s) exp\Bigl( \int_{s}^{x}dr \ g(r) \Bigr)g(x)$$

$$\frac{d f(x)}{dx}= f_0 \ exp\Bigl( \int_{0}^{x}ds \ g(s) \Bigr) g(x) +\int_{0}^{x}ds \ h(s) exp\Bigl( \int_{s}^{x}dr \ g(r) \Bigr)g(x)+ h(x)exp\Bigl( \int_{s}^{x}dr \ g(r) \Bigr)$$

$$\frac{d f(x)}{dx}=f(x)g(x)+ h(x)exp\Bigl( \int_{s}^{x}dr \ g(r) \Bigr)$$

Now I'm just having trouble with the term ##h(x)exp\Bigl( \int_{s}^{x}dr \ g(r) \Bigr)##, which is equivalent to ##f(x,x)##. I was just having trouble figuring out what the exp term should be. After all, the easiest way would be for the integral to go from x to x, which would make the exponent zero and thus ##e^{0}=1## and I would get ##f(x)g(x)+h(x)##

Lambda96 said:
Now I'm just having trouble with the term ##h(x)exp\Bigl( \int_{s}^{x}dr \ g(r) \Bigr)##, which is equivalent to ##f(x,x)##. I was just having trouble figuring out what the exp term should be. After all, the easiest way would be for the integral to go from x to x, which would make the exponent zero and thus ##e^{0}=1## and I would get ##f(x)g(x)+h(x)##

Yes. The integrand is a function of $x$ and $s$, so it is evaluated at $(x,s) = (x,x)$.

Lambda96
Lambda96 said:
I then tried another approach and first wanted to get rid of the integrals in the exp terms

$$f_0 \exp\biggl( G(x)-G(0) \biggr)+\int_{0}^{x}ds \ h(s) \exp \biggl( G(x)-G(s) \biggr) \,dx$$
$$f_0 e^{G(x)-G(0)} + e^{G(x)} \int_{0}^{x}ds \ h(s) e^{-G(s)}$$

Unfortunately, I now have problems again with the derivative for the second term using this method.
The second term is of the form ##e^{G(x)} [J(x)-J(0)]## where ##J'(x) = h(x) \exp[-G(x)]##. Just apply the product rule.

Lambda96
Thanks pasmith and vela for your help

## What is a linear first-order differential equation?

A linear first-order differential equation is an equation of the form $$\frac{dy}{dx} + P(x)y = Q(x)$$, where $$P(x)$$ and $$Q(x)$$ are functions of $$x$$. It is called 'first-order' because it involves the first derivative of $$y$$ with respect to $$x$$ and 'linear' because $$y$$ and its derivative appear to the first power and are not multiplied together.

## How do you solve a linear first-order differential equation?

To solve a linear first-order differential equation, you can use the integrating factor method. The integrating factor is $$\mu(x) = e^{\int P(x) \, dx}$$. Multiply the entire differential equation by this integrating factor to transform it into an exact equation, which can then be integrated directly to find the solution.

## What is an initial condition in the context of differential equations?

An initial condition is a value that specifies the state of the system at a particular point, usually given as $$y(x_0) = y_0$$. This condition is used to find the specific solution to a differential equation that satisfies the given initial state.

## How do you apply an initial condition to the solution of a differential equation?

After finding the general solution to the differential equation, you substitute the initial condition into the solution to solve for the constant of integration. This gives you the particular solution that satisfies both the differential equation and the initial condition.

## Can you provide an example of solving a linear first-order differential equation with an initial condition?

Sure! Consider the differential equation $$\frac{dy}{dx} + 2y = 6$$ with the initial condition $$y(0) = 3$$. The integrating factor is $$\mu(x) = e^{\int 2 \, dx} = e^{2x}$$. Multiplying through by the integrating factor, we get $$e^{2x} \frac{dy}{dx} + 2e^{2x} y = 6e^{2x}$$, which simplifies to $$\frac{d}{dx}(e^{2x} y) = 6e^{2x}$$. Integrating both sides with respect to $$x$$, we get $$e^{2x} y = 3e^{2x} + C$$. Solving for $$y$$, we have $$y = 3 + Ce^{-2x}$$. Applying the initial condition $$y(0) = 3$$, we find $$3 = 3 + C$$, so $$C = 0$$. Therefore, the

• Calculus and Beyond Homework Help
Replies
6
Views
1K
• Calculus and Beyond Homework Help
Replies
14
Views
565
• Calculus and Beyond Homework Help
Replies
2
Views
525
• Calculus and Beyond Homework Help
Replies
13
Views
716
• Calculus and Beyond Homework Help
Replies
2
Views
430
• Calculus and Beyond Homework Help
Replies
1
Views
555
• Calculus and Beyond Homework Help
Replies
2
Views
773
• Calculus and Beyond Homework Help
Replies
6
Views
1K
• Calculus and Beyond Homework Help
Replies
3
Views
500
• Calculus and Beyond Homework Help
Replies
1
Views
837