<p>I'm answering the mathematical side of this question and not the economic side. Someone who knows the concerned subject can answer it perhaps.</p>
<p>Notation: <span class="math-container">$\dot{x} := x'(t)$</span></p>
<p>The given differential equation is <span class="math-container">$\dot{y} + \alpha(y - \theta) = \sigma \dot{\eta} \iff \dot{z} + \alpha z = \sigma \dot{\eta}$</span>. This is not equivalent to (unless you deliberately wrote <span class="math-container">$\mu$</span> to denote the desired constant, which has to be written in a piece-wise format)</p>
<blockquote>
<p><a href="https://i.sstatic.net/MLYLWm.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/MLYLWm.png" alt="enter image description here" /></a></p>
</blockquote>
<p>You can instead write it as <span class="math-container">$$\frac{d}{dt}[z e^{\alpha t}] = \left(\frac{\sigma}{\alpha}\right) \frac{d}{dt} [\dot{\eta} e^{\alpha t}]$$</span></p>
<p>Now integrate both sides over <span class="math-container">$t \in [0,s]$</span> where <span class="math-container">$s &gt; t_0+h$</span>:</p>
<p><span class="math-container">\begin{align*}
\int_{z(0)}^{z(s) e^{\alpha s}} d (z e^{\alpha t}) &amp;= \int_{z(0)}^{z(s) e^{\alpha s}} \left(\frac{\sigma}{\alpha}\right) d (\dot{\eta} e^{\alpha t}) \\
&amp;= \int_{0}^{s} \left(\frac{\sigma}{\alpha}\right) (\ddot{\eta} e^{\alpha t} + \dot{\eta}\alpha e^{\alpha t}) dt \quad (\color{red}\star)\\
&amp;= \sigma \int_0^s \dot{\eta} e^{\alpha t} dt \\
&amp;= \sigma \left( \underbrace{\int_0^{t_0} \dot{\eta} e^{\alpha t} dt}_{\text{this is 0 as } \dot{\eta} = 0 \ \forall \ t \in [0,t_0]} + \underbrace{\int_{t_0}^{t_0+h} (\dot{\eta} e^{\alpha t}) dt}_{\text{here } \dot{\eta} = \frac{1}{h} \ \forall \ t \in [t_0, t_0+h]} + \underbrace{\int_{t_0+h}^{s} \dot{\eta} e^{\alpha t} dt}_{\text{this is 0 as } \dot{\eta} = 0 \ \forall \ t &gt; t_0+h} \right) \\
&amp;= \frac{\sigma}{h} \left(\int_{t_0}^{t_0+h} e^{\alpha t} dt \right)
\end{align*}</span></p>
<p>to get <span class="math-container">$\displaystyle z(s) e^{\alpha s} - z(0) = \frac{\sigma}{h} \int_{t_0}^{t_0+h} e^{\alpha t} = \frac{\sigma}{h} \left( \frac{e^{\alpha (t_0+h)}-e^{\alpha t_0}}{\alpha} \right)$</span>.</p>
<p>Simplifying it, we get <span class="math-container">$\displaystyle z(s) = z(0)e^{-\alpha s} + \frac{\sigma}{h} e^{-\alpha s}  e^{\alpha t_0} \left( \frac{e^{\alpha h} - 1}{\alpha} \right)$</span> which matches with their solution except for an additional <span class="math-container">$h$</span> they have written (and you pointed out below in your answer).</p>
<hr />
<p>Some explanations/calculations that may be helpful:</p>
<ul>
<li><span class="math-container">$({\color{red} \star})$</span> follows from <span class="math-container">$\frac{d (\dot\eta e^{\alpha t})}{dt} = \ddot{\eta} e^{\alpha t} + \dot{\eta} \alpha e^{\alpha t} \implies d (\dot\eta e^{\alpha t}) = (\ddot{\eta} e^{\alpha t} + \dot{\eta} \alpha e^{\alpha t}) dt$</span> and changing the limits of the integral appropriately.</li>
<li><span class="math-container">$\int e^{\alpha t} dt = \frac{e^{\alpha t}}{\alpha} + c$</span>. From here, we get <span class="math-container">$\int_{t_0}^{t_0+h} e^{\alpha t} dt = \frac{e^{\alpha t}}{\alpha} \vert_{t_0}^{t_0+h} = \frac{e^{\alpha(t_0+h))} - e^{\alpha t_0}}{\alpha}$</span>.</li>
</ul>

CC BY-SA 4.0
2023-05-23T09:23:42.040Z
Hi Solow! Thanks for the help here. So can I check that you think the mark scheme screenshot (ignore my μ squiggle) just their original is written wrong? As it seems to completely ignore the μ function?
CormJack
CC BY-SA 4.0
2023-05-23T09:26:50.530Z
I would also be immensely grateful if you can explain how / why you were able to construct the range of integration as you have. Maybe if you are able to explain in words, how you would know to do this seeing this question? Basically it’s really i obvious to me how to use definite intergrals in differnrtiation equations. My course notes only include indefinite integrals in integration. Thank you!
CormJack
CC BY-SA 4.0
2023-05-23T11:07:20.827Z
Also to clarify my little u i drew, and the μ in my above comments was meant to be the η
CormJack
CC BY-SA 4.0
2023-05-23T11:14:39.817Z
Also i realise I'm unclear on why when we simply multiply through by th eintegrating factor $e^{αt}$ which i think gives $σ\frac{dη}{dt}e^{αt}$ on the RHS? This equals $\frac{σ}{α}\frac{d}{dt}[\frac{dη}{dt}e^{αt}]$? I can see that i guess the $α$  will come down and cancel with the $α$ in the fraction, but aren't we differentiating the product of a derivative and the function of $t$  i.e. $\dotηe^{αt}$ which will give us something including second derivatives i.e. $\ddotη$
CormJack
CC BY-SA 4.0
2023-05-23T11:50:09.870Z
Intuition behind the integration: [Riemann sum](https://en.wikipedia.org/wiki/Riemann_sum). You can think of it as a summation over all $t \in [0,s] \cap \mathbb{R}$ instead of just $t \in [0,s] \cap \mathbb{Z}$ as we do in normal summation.

Why do we do this? To get a nice algebraic form that allows us to solve $y(t)$. It's just *another* algebraic manipulation.
solow supremacy
CC BY-SA 4.0
2023-05-23T11:52:27.927Z
I just added an answer building on your post. Would love your thoughts!
CormJack
CC BY-SA 4.0
2023-05-23T12:03:32.163Z
The integrating factor works this way: $$\dot{z} + \alpha z = \sigma \dot{\eta} \iff (\dot{z} + \alpha z)e^{\alpha t} = (\sigma \dot{\eta}) e^{\alpha t} = \left(\frac{\sigma}{\alpha}\right)(\ddot{\eta} +  \alpha \dot{\eta}) e^{\alpha t}$$ 
where $\ddot{\eta} = 0$.

See (possibly by differentiating $ze^{\alpha t}$ and $\dot{\eta} e^{\alpha t}$ yourself) that the above equation is equivalent to $\frac{d}{dt} (z(t) e^{\alpha t}) = \frac{d}{dt} (\dot{\eta(t)} e^{\alpha t})$.
solow supremacy
CC BY-SA 4.0
2023-05-23T12:05:47.793Z
Ah that's so clever using the fact that $\ddotη = 0$ wouldn't have thought of that, thanks so much for sharing! I guess the logical next step is understanding the added value / different intuition of of your approach, compared to what i've written below. Unless my answer below is wrong,  thanks for taking time on this!
CormJack
CC BY-SA 4.0
2023-05-23T12:10:26.857Z
Okay i think i see it...you wanted to package it all together as one derivative. So that when we integrate, we don't actually need to do any real integration, we just remove (undo) the derivative. So your solution is the same but more elegant yes?
CormJack
CC BY-SA 4.0
2023-05-23T12:13:42.987Z
Right, the idea is to make the integration immediate (by packaging it all together as one derivative as you said). I'll check your solution after sometime (say, by the next 24 hours), but surely.
solow supremacy
CC BY-SA 4.0
2023-05-23T12:28:30.940Z
Wonderful, take your time!
CormJack
CC BY-SA 4.0
2023-05-23T01:40:57.137Z
2023-05-24T20:32:04.607Z
2023-05-24T20:32:04.607Z
solow supremacy
<p>Okay so with the incredibly useful post by Solow Supremacy (Many thanks Solow) i believe i have created a correct solution. See attachment below. The things i want to clarify are.</p>
<ol>
<li>The mark scheme writes the RHS of the differential equation as <span class="math-container">$σ\frac{d}{dt}e^{αt}$</span> i believe this is a typo, it's missing the <span class="math-container">$η$</span>, and so instead reads as something totally different. It should be <span class="math-container">$σ\frac{dη}{dt}e^{αt}$</span>?</li>
</ol>
<ul>
<li>Using this correct equation we then wright it out piece wise...splitting into multiple integrals, where the range of each integral corresponds to the different ranges of the piecewise function?</li>
</ul>
<ol start="2">
<li><p>@Solow i still don't understand how you get <span class="math-container">$(\frac{σ}{α})\frac{d}{dt}[\frac{dη}{dt}e^{αt}]$</span> where you have used the <span class="math-container">$\dotη$</span> notation for <span class="math-container">$\frac{dη}{dt}$</span>.<em>UPDATE: this is now understood...very clever</em>.</p>
</li>
<li><p>As suggested i then split it up into multiple integrals. However i don't think i had the correct language for saying <span class="math-container">$\frac{dη}{dt}$</span> evaluated between <span class="math-container">$a$</span> and <span class="math-container">$b$</span> e.g. i used the makeshift <span class="math-container">$\frac{dη}{dt}|_a^b$</span> is this valid? How would i write it?</p>
</li>
<li><p>I believe the Markscheme has another typo in it as there final answer has two <span class="math-container">$\frac{1}{h}$</span>'s i.e. <span class="math-container">$\frac{1}{h^2}$</span>. I don't see where they get the second <span class="math-container">$h$</span>?</p>
</li>
</ol>
<p><a href="https://i.sstatic.net/LHlrr.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/LHlrr.jpg" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2023-05-23T11:55:14.560Z
NOTE: i updated the picture as i was missing an $e^{-αs}$ in the final answer!
CormJack
CC BY-SA 4.0
2023-05-24T00:26:04.973Z
It appears that you don't know how to write the notations properly, and so your work is straining my eyes a bit. Your makeshift notation is not correct. What I did instead is I have modified my original answer so that you can figure things out from there. That being said, you are right that they added an extra $h$ in the denominator, and I feel that you have the correct idea/intuition - you just don't know the way to write it properly.
solow supremacy
CC BY-SA 4.0
2023-05-24T07:53:15.377Z
Okay fantastic. You are correct i don't! What i understand is how to split the integral into different regions that's fine. if you have time, can you tell me how to show that the derivative inside the integral, is also only being evaluated over those regions. That's what i was trying to signal with $\frac{dη}{dt}|_a^b$
CormJack
CC BY-SA 4.0
2023-05-24T07:54:45.613Z
Obviously a derivative is evaluated at a specific point. But i guess I'm trying to say that the derivative could be evaluated at any point fro say $0$ to $t_0$ and it would go to zero as required!
CormJack
CC BY-SA 4.0
2023-05-24T20:36:46.980Z
Can you check the updated answer? I think you were asking about the $({\color{red}{\star}})$ for which I added an explanation. If you don't understand the change in limits, then you may read about *substitution by integration* from somewhere. But to understand the proof, you will be required to know about the fundamental theorem of calculus (FTC). Knowing this (FTC) will additionally help you understand definite integrals better.
solow supremacy
CC BY-SA 4.0
2023-05-24T20:45:19.527Z
Hi Solow, thanks for updating the answer, and spending so much time on it.
CormJack
CC BY-SA 4.0
2023-05-24T21:02:31.657Z
Before i understood: 1) How the $({\color{red}{\star}})$ and why that derivative of the derivative worked, and why you did it to make the integration immediate. 2) I also understood  why you split the integral up into 3, to cover the 3 different ranges over which our derivative takes 0 or a non-zero value. Because of the piece wise nature of the underlying function.
CormJack
CC BY-SA 4.0
2023-05-24T21:04:46.890Z
What i was unsure about was 1) whether the range of integration automatically translated for the derivative within the integral. E.g. you were integrating a derivative from the range of say 0 to $t_0$, does that mean that the derivative being integrated is also evaluated along that range, allowing us to put it to zero, as we required.
CormJack
CC BY-SA 4.0
2023-05-24T21:11:04.593Z
Moreover in the method i used where i split the integral into into three like you, i didn't package up my function into a single derivative, instead my integral included a derivative multiplied by a function of t. Now within the range 0 to $t_0$ and $to+h$ onwards, that derivative still goes to 0. So i basically wanted to evaluate the derivative wthin the integral, without first having to do the integral. So that the integral would go to zero. Or i would have the desired integral with $1/h$ in it?
CormJack
CC BY-SA 4.0
2023-05-24T21:13:26.367Z
Like if you look in my answer the strait line next to the derivative is me trying to say evaluated over this range. But i understand that's probably invalid. 

I understand why yours works now, because by packaging up the entire thing as one derivative. When we integrate it literally just becomes the derivative evaluated over the range of integration, as required. I was trying to work out if it was still possible splitting it up like this, if i hadn't spotted your clever trick of packaging it all together as one derivative!
CormJack
CC BY-SA 4.0
2023-05-24T21:24:17.817Z
I noticed now compared to your original answer, you have unpacked it, so that your three integrals are also integrals of a function of t multiplied by a derivative i.e. $\dot{\eta} e^{\alpha t}$. For this integral to go to zero, we are surely claiming that the range of integration applies, to the derivative. How does this work, is what i'm trying to get at. Why are we automatically allowed to apply our range of integration, to the derivative that is part of the integrand, so that the entire integral goes to zero.
CormJack
CC BY-SA 4.0
2023-05-24T22:06:00.720Z
You begin your answer by writing $\int_0^s \frac{d}{dt} (z e^{\alpha t})$ which doesn't make sense. You need a differential (or the $d [..]$) over which you're going to integrate. My previous answer was actually incorrect (sorry, I was hurrying): I wanted to integrate over $t \in [0,s]$, but I instead integrated over $z e^{\alpha t} \in [0,s]$. My updated answer fixes that issue. So just forget my previous answer (to avoid confusion) and see if you can attempt solving it on your own by following my current answer.
solow supremacy
CC BY-SA 4.0
2023-05-24T22:15:13.490Z
Say you're integrating $\int_{a}^{b} f(x) dx$. It basically means you're integrating the function $f(x)$ over $x \in [a,b]$. So the range is denoted by the limits written at the bottom and top of the integral sign $\int$. For example, $\int_a^b d (f(x)) \equiv \int_a^b 1 \ d(f(x)) = b-a$. Here, you're integrating the function $1$ (which you can treat as $g(f(x)) = 1$ and re-write the integration as $\int_a^b g(f(x)) d (f(x)) \equiv \int_a^b g(y) dy \equiv \int_a^b 1 \ dy = b-a$) over $f(x) \in [a,b] \iff y \in [a,b]$.
solow supremacy
CC BY-SA 4.0
2023-05-24T22:16:26.423Z
This example above is exactly what we are doing to solve $\int_{z(0)}^{z(s) e^{\alpha s}} 1 \ d(z e^{\alpha t})$. (One important thing to note is that $z(x)$ must be injective or strictly monotone, so that varying $t$ over $[0,s]$ is same as varying $z(t) e^{\alpha t}$ over $[z(0) e^{\alpha \cdot 0}, z(s) e^{\alpha s}]$... which we did! Again the proof follows by substitution by integration and FTC.)
solow supremacy
CC BY-SA 4.0
2023-05-25T07:18:12.600Z
Okay thank you Solow, really appreciate it! I will take time to really think about this, and then if i have further comments i'll make it a question, at least that way you get extra reputation for your all hard work (assuming you have time to answer) lol. Also just to clarify, i agree $\int_0^s \frac{d}{dt} (z e^{\alpha t})$ this is wrong and a typo i mean't $\int_0^s \frac{d}{dt} (z e^{\alpha t})dt$ so i was integrating both sides with respect to t. Which i believe gives $z(s)e^{\alpha s} - z(0)$
CormJack
CC BY-SA 4.0
2023-05-25T09:22:47.103Z
No, and that was exactly the mistake before I updated the answer. $$\int_0^s d (z e^{\alpha t}) \equiv \int_0^s 1 \ d (z e^{\alpha t}) \equiv \int_0^s 1 \ dy = y \vert_0^s = s$$ as I explained in my previous 3 comments. And yes, please ask a new question so that it's easier to answer. Comments have a limited space and so it gets clustered.
solow supremacy
CC BY-SA 4.0
2023-05-25T20:14:42.500Z
Okay i will post another question next week after my exam, and then comment the link here. I must admit i can't see at all why $\int_0^s \frac{d}{dt} (z e^{\alpha t})dt = [(z(t) e^{\alpha t})]_0^s = z(s)e^{\alpha s} - z(0)$ is wrong.
CormJack
CC BY-SA 4.0
2023-05-23T11:50:59.923Z
2023-05-23T12:11:40.820Z
2023-05-23T12:11:40.820Z
CormJack
<p>This question is proving unusually confusing. I would greatly appreciate your help and also your patience...I'm going to upload this question/mark scheme via screenshot. I know that is frowned upon, but in this rare case i hope those of you who know me can forgive hahah.</p>
<p><strong>Question (b)</strong> is what is causing me grief. I'm particularly confused by:</p>
<ol>
<li>The piecewise nature of <span class="math-container">$η(t)$</span> &amp; how we apply it. The question asks me to solve for <span class="math-container">$t &gt; t_0 + h$</span>, so in that case why doesn't the derivative just go to zero as specified by &quot;<em>otherwise</em>&quot; element of the function.</li>
<li>The definite integration range from <span class="math-container">$t_0$</span> to <span class="math-container">$t_0 + h$</span>. This is a common trick I'm seeing amongst these questions, i made a <a href="https://economics.stackexchange.com/questions/55253/definite-integral-technique-for-differential-equation">previous post about it</a>. But i'm still struggling with the general intuition for the technique. I know it sounds kind of obvious i.e. &quot;<em>We have a range for t, let's just turn that into a range of integration&quot;,</em> but tbh i don't really get it. E.g. When could we not do this?</li>
<li>The random <span class="math-container">$-(z(0))$</span>. What i think has happened here is that because the right hand side has become a definite integral, the constant of integration from the LHS can't be subsumed into the RHS, so we have just arbitrarily decided to make the LHS constant of integration <span class="math-container">$-z(0)$</span>?</li>
<li>The use of <span class="math-container">$s$</span>. Is this just meant to represent <span class="math-container">$s = t &gt; t_0 + h$</span>?. But this takes me back to my confusion expressed in 1.</li>
</ol>
<p>Many thanks in advance!</p>
<p><a href="https://i.sstatic.net/kuoEu.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/kuoEu.jpg" alt="enter image description here" /></a></p>
<p><a href="https://i.sstatic.net/aFcxi.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/aFcxi.jpg" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2023-05-20T22:03:38.607Z
I added the little arrow with the η in the mark scheme as i believed it was a typo it not being there? Am i correct?
CormJack
<mathematical-economics><financial-economics>
Mean regression model question
CormJack
# Mean regression model question

(Asked by: username_0 on 2023-05-20)

This question is proving unusually confusing. I would greatly appreciate your help and also your patience...I'm going to upload this question/mark scheme via screenshot. I know that is frowned upon, but in this rare case i hope those of you who know me can forgive hahah.

**Question (b)** is what is causing me grief. I'm particularly confused by:

1. The piecewise nature of $η(t)$ & how we apply it. The question asks me to solve for $t > t\_0 + h$, so in that case why doesn't the derivative just go to zero as specified by "*otherwise*" element of the function.
2. The definite integration range from $t\_0$ to $t\_0 + h$. This is a common trick I'm seeing amongst these questions, i made a [previous post about it](https://economics.stackexchange.com/questions/55253/definite-integral-technique-for-differential-equation). But i'm still struggling with the general intuition for the technique. I know it sounds kind of obvious i.e. "*We have a range for t, let's just turn that into a range of integration",* but tbh i don't really get it. E.g. When could we not do this?
3. The random $-(z(0))$. What i think has happened here is that because the right hand side has become a definite integral, the constant of integration from the LHS can't be subsumed into the RHS, so we have just arbitrarily decided to make the LHS constant of integration $-z(0)$?
4. The use of $s$. Is this just meant to represent $s = t > t\_0 + h$?. But this takes me back to my confusion expressed in 1.

Many thanks in advance!

[![enter image description here](https://i.sstatic.net/kuoEu.jpg)](https://i.sstatic.net/kuoEu.jpg)

[![enter image description here](https://i.sstatic.net/aFcxi.jpg)](https://i.sstatic.net/aFcxi.jpg)

**Tags:** mathematical-economics, financial-economics
> **Comments:**
> **username_0**: I added the little arrow with the η in the mark scheme as i believed it was a typo it not being there? Am i correct?  

---

## 2 answers

### Answer by username_1 on 2023-05-23. Score: 1 | Accepted answer

I'm answering the mathematical side of this question and not the economic side. Someone who knows the concerned subject can answer it perhaps.

Notation: $\dot{x} := x'(t)$

The given differential equation is $\dot{y} + \alpha(y - \theta) = \sigma \dot{\eta} \iff \dot{z} + \alpha z = \sigma \dot{\eta}$. This is not equivalent to (unless you deliberately wrote $\mu$ to denote the desired constant, which has to be written in a piece-wise format)

> [![enter image description here](https://i.sstatic.net/MLYLWm.png)](https://i.sstatic.net/MLYLWm.png)

You can instead write it as $$\frac{d}{dt}[z e^{\alpha t}] = \left(\frac{\sigma}{\alpha}\right) \frac{d}{dt} [\dot{\eta} e^{\alpha t}]$$

Now integrate both sides over $t \in [0,s]$ where $s > t\_0+h$:

\begin{align\*}
\int\_{z(0)}^{z(s) e^{\alpha s}} d (z e^{\alpha t}) &= \int\_{z(0)}^{z(s) e^{\alpha s}} \left(\frac{\sigma}{\alpha}\right) d (\dot{\eta} e^{\alpha t}) \\
&= \int\_{0}^{s} \left(\frac{\sigma}{\alpha}\right) (\ddot{\eta} e^{\alpha t} + \dot{\eta}\alpha e^{\alpha t}) dt \quad (\color{red}\star)\\
&= \sigma \int\_0^s \dot{\eta} e^{\alpha t} dt \\
&= \sigma \left( \underbrace{\int\_0^{t\_0} \dot{\eta} e^{\alpha t} dt}\_{\text{this is 0 as } \dot{\eta} = 0 \ \forall \ t \in [0,t\_0]} + \underbrace{\int\_{t\_0}^{t\_0+h} (\dot{\eta} e^{\alpha t}) dt}\_{\text{here } \dot{\eta} = \frac{1}{h} \ \forall \ t \in [t\_0, t\_0+h]} + \underbrace{\int\_{t\_0+h}^{s} \dot{\eta} e^{\alpha t} dt}\_{\text{this is 0 as } \dot{\eta} = 0 \ \forall \ t > t\_0+h} \right) \\
&= \frac{\sigma}{h} \left(\int\_{t\_0}^{t\_0+h} e^{\alpha t} dt \right)
\end{align\*}

to get $\displaystyle z(s) e^{\alpha s} - z(0) = \frac{\sigma}{h} \int\_{t\_0}^{t\_0+h} e^{\alpha t} = \frac{\sigma}{h} \left( \frac{e^{\alpha (t\_0+h)}-e^{\alpha t\_0}}{\alpha} \right)$.

Simplifying it, we get $\displaystyle z(s) = z(0)e^{-\alpha s} + \frac{\sigma}{h} e^{-\alpha s} e^{\alpha t\_0} \left( \frac{e^{\alpha h} - 1}{\alpha} \right)$ which matches with their solution except for an additional $h$ they have written (and you pointed out below in your answer).

---

Some explanations/calculations that may be helpful:

* $({\color{red} \star})$ follows from $\frac{d (\dot\eta e^{\alpha t})}{dt} = \ddot{\eta} e^{\alpha t} + \dot{\eta} \alpha e^{\alpha t} \implies d (\dot\eta e^{\alpha t}) = (\ddot{\eta} e^{\alpha t} + \dot{\eta} \alpha e^{\alpha t}) dt$ and changing the limits of the integral appropriately.
* $\int e^{\alpha t} dt = \frac{e^{\alpha t}}{\alpha} + c$. From here, we get $\int\_{t\_0}^{t\_0+h} e^{\alpha t} dt = \frac{e^{\alpha t}}{\alpha} \vert\_{t\_0}^{t\_0+h} = \frac{e^{\alpha(t\_0+h))} - e^{\alpha t\_0}}{\alpha}$.

> **Comments:**
> **username_0**: Hi Solow! Thanks for the help here. So can I check that you think the mark scheme screenshot (ignore my μ squiggle) just their original is written wrong? As it seems to completely ignore the μ function?  
> **username_0**: I would also be immensely grateful if you can explain how / why you were able to construct the range of integration as you have. Maybe if you are able to explain in words, how you would know to do this seeing this question? Basically it’s really i obvious to me how to use definite intergrals in differnrtiation equations. My course notes only include indefinite integrals in integration. Thank you!  
> **username_0**: Also to clarify my little u i drew, and the μ in my above comments was meant to be the η  
> **username_0**: Also i realise I'm unclear on why when we simply multiply through by th eintegrating factor $e^{αt}$ which i think gives $σ\frac{dη}{dt}e^{αt}$ on the RHS? This equals $\frac{σ}{α}\frac{d}{dt}[\frac{dη}{dt}e^{αt}]$? I can see that i guess the $α$  will come down and cancel with the $α$ in the fraction, but aren't we differentiating the product of a derivative and the function of $t$  i.e. $\dotηe^{αt}$ which will give us something including second derivatives i.e. $\ddotη$  
> **username_1**: Intuition behind the integration: [Riemann sum](https://en.wikipedia.org/wiki/Riemann_sum). You can think of it as a summation over all $t \in [0,s] \cap \mathbb{R}$ instead of just $t \in [0,s] \cap \mathbb{Z}$ as we do in normal summation.  Why do we do this? To get a nice algebraic form that allows us to solve $y(t)$. It's just *another* algebraic manipulation.  
> **username_0**: I just added an answer building on your post. Would love your thoughts!  
> **username_1**: The integrating factor works this way: $$\dot{z} + \alpha z = \sigma \dot{\eta} \iff (\dot{z} + \alpha z)e^{\alpha t} = (\sigma \dot{\eta}) e^{\alpha t} = \left(\frac{\sigma}{\alpha}\right)(\ddot{\eta} +  \alpha \dot{\eta}) e^{\alpha t}$$  where $\ddot{\eta} = 0$.  See (possibly by differentiating $ze^{\alpha t}$ and $\dot{\eta} e^{\alpha t}$ yourself) that the above equation is equivalent to $\frac{d}{dt} (z(t) e^{\alpha t}) = \frac{d}{dt} (\dot{\eta(t)} e^{\alpha t})$.  
> **username_0**: Ah that's so clever using the fact that $\ddotη = 0$ wouldn't have thought of that, thanks so much for sharing! I guess the logical next step is understanding the added value / different intuition of of your approach, compared to what i've written below. Unless my answer below is wrong,  thanks for taking time on this!  
> **username_0**: Okay i think i see it...you wanted to package it all together as one derivative. So that when we integrate, we don't actually need to do any real integration, we just remove (undo) the derivative. So your solution is the same but more elegant yes?  
> **username_1**: Right, the idea is to make the integration immediate (by packaging it all together as one derivative as you said). I'll check your solution after sometime (say, by the next 24 hours), but surely.  
> **username_0**: Wonderful, take your time!  

---

### Answer by username_0 on 2023-05-23. Score: 1

Okay so with the incredibly useful post by Solow Supremacy (Many thanks Solow) i believe i have created a correct solution. See attachment below. The things i want to clarify are.

1. The mark scheme writes the RHS of the differential equation as $σ\frac{d}{dt}e^{αt}$ i believe this is a typo, it's missing the $η$, and so instead reads as something totally different. It should be $σ\frac{dη}{dt}e^{αt}$?

* Using this correct equation we then wright it out piece wise...splitting into multiple integrals, where the range of each integral corresponds to the different ranges of the piecewise function?

2. @Solow i still don't understand how you get $(\frac{σ}{α})\frac{d}{dt}[\frac{dη}{dt}e^{αt}]$ where you have used the $\dotη$ notation for $\frac{dη}{dt}$.*UPDATE: this is now understood...very clever*.
3. As suggested i then split it up into multiple integrals. However i don't think i had the correct language for saying $\frac{dη}{dt}$ evaluated between $a$ and $b$ e.g. i used the makeshift $\frac{dη}{dt}|\_a^b$ is this valid? How would i write it?
4. I believe the Markscheme has another typo in it as there final answer has two $\frac{1}{h}$'s i.e. $\frac{1}{h^2}$. I don't see where they get the second $h$?

[![enter image description here](https://i.sstatic.net/LHlrr.jpg)](https://i.sstatic.net/LHlrr.jpg)

> **Comments:**
> **username_0**: NOTE: i updated the picture as i was missing an $e^{-αs}$ in the final answer!  
> **username_1**: It appears that you don't know how to write the notations properly, and so your work is straining my eyes a bit. Your makeshift notation is not correct. What I did instead is I have modified my original answer so that you can figure things out from there. That being said, you are right that they added an extra $h$ in the denominator, and I feel that you have the correct idea/intuition - you just don't know the way to write it properly.  
> **username_0**: Okay fantastic. You are correct i don't! What i understand is how to split the integral into different regions that's fine. if you have time, can you tell me how to show that the derivative inside the integral, is also only being evaluated over those regions. That's what i was trying to signal with $\frac{dη}{dt}|_a^b$  
> **username_0**: Obviously a derivative is evaluated at a specific point. But i guess I'm trying to say that the derivative could be evaluated at any point fro say $0$ to $t_0$ and it would go to zero as required!  
> **username_1**: Can you check the updated answer? I think you were asking about the $({\color{red}{\star}})$ for which I added an explanation. If you don't understand the change in limits, then you may read about *substitution by integration* from somewhere. But to understand the proof, you will be required to know about the fundamental theorem of calculus (FTC). Knowing this (FTC) will additionally help you understand definite integrals better.  
> **username_0**: Hi Solow, thanks for updating the answer, and spending so much time on it.  
> **username_0**: Before i understood: 1) How the $({\color{red}{\star}})$ and why that derivative of the derivative worked, and why you did it to make the integration immediate. 2) I also understood  why you split the integral up into 3, to cover the 3 different ranges over which our derivative takes 0 or a non-zero value. Because of the piece wise nature of the underlying function.  
> **username_0**: What i was unsure about was 1) whether the range of integration automatically translated for the derivative within the integral. E.g. you were integrating a derivative from the range of say 0 to $t_0$, does that mean that the derivative being integrated is also evaluated along that range, allowing us to put it to zero, as we required.  
> **username_0**: Moreover in the method i used where i split the integral into into three like you, i didn't package up my function into a single derivative, instead my integral included a derivative multiplied by a function of t. Now within the range 0 to $t_0$ and $to+h$ onwards, that derivative still goes to 0. So i basically wanted to evaluate the derivative wthin the integral, without first having to do the integral. So that the integral would go to zero. Or i would have the desired integral with $1/h$ in it?  
> **username_0**: Like if you look in my answer the strait line next to the derivative is me trying to say evaluated over this range. But i understand that's probably invalid.   I understand why yours works now, because by packaging up the entire thing as one derivative. When we integrate it literally just becomes the derivative evaluated over the range of integration, as required. I was trying to work out if it was still possible splitting it up like this, if i hadn't spotted your clever trick of packaging it all together as one derivative!  
> **username_0**: I noticed now compared to your original answer, you have unpacked it, so that your three integrals are also integrals of a function of t multiplied by a derivative i.e. $\dot{\eta} e^{\alpha t}$. For this integral to go to zero, we are surely claiming that the range of integration applies, to the derivative. How does this work, is what i'm trying to get at. Why are we automatically allowed to apply our range of integration, to the derivative that is part of the integrand, so that the entire integral goes to zero.  
> **username_1**: You begin your answer by writing $\int_0^s \frac{d}{dt} (z e^{\alpha t})$ which doesn't make sense. You need a differential (or the $d [..]$) over which you're going to integrate. My previous answer was actually incorrect (sorry, I was hurrying): I wanted to integrate over $t \in [0,s]$, but I instead integrated over $z e^{\alpha t} \in [0,s]$. My updated answer fixes that issue. So just forget my previous answer (to avoid confusion) and see if you can attempt solving it on your own by following my current answer.  
> **username_1**: Say you're integrating $\int_{a}^{b} f(x) dx$. It basically means you're integrating the function $f(x)$ over $x \in [a,b]$. So the range is denoted by the limits written at the bottom and top of the integral sign $\int$. For example, $\int_a^b d (f(x)) \equiv \int_a^b 1 \ d(f(x)) = b-a$. Here, you're integrating the function $1$ (which you can treat as $g(f(x)) = 1$ and re-write the integration as $\int_a^b g(f(x)) d (f(x)) \equiv \int_a^b g(y) dy \equiv \int_a^b 1 \ dy = b-a$) over $f(x) \in [a,b] \iff y \in [a,b]$.  
> **username_1**: This example above is exactly what we are doing to solve $\int_{z(0)}^{z(s) e^{\alpha s}} 1 \ d(z e^{\alpha t})$. (One important thing to note is that $z(x)$ must be injective or strictly monotone, so that varying $t$ over $[0,s]$ is same as varying $z(t) e^{\alpha t}$ over $[z(0) e^{\alpha \cdot 0}, z(s) e^{\alpha s}]$... which we did! Again the proof follows by substitution by integration and FTC.)  
> **username_0**: Okay thank you Solow, really appreciate it! I will take time to really think about this, and then if i have further comments i'll make it a question, at least that way you get extra reputation for your all hard work (assuming you have time to answer) lol. Also just to clarify, i agree $\int_0^s \frac{d}{dt} (z e^{\alpha t})$ this is wrong and a typo i mean't $\int_0^s \frac{d}{dt} (z e^{\alpha t})dt$ so i was integrating both sides with respect to t. Which i believe gives $z(s)e^{\alpha s} - z(0)$  
> **username_1**: No, and that was exactly the mistake before I updated the answer. $$\int_0^s d (z e^{\alpha t}) \equiv \int_0^s 1 \ d (z e^{\alpha t}) \equiv \int_0^s 1 \ dy = y \vert_0^s = s$$ as I explained in my previous 3 comments. And yes, please ask a new question so that it's easier to answer. Comments have a limited space and so it gets clustered.  
> **username_0**: Okay i will post another question next week after my exam, and then comment the link here. I must admit i can't see at all why $\int_0^s \frac{d}{dt} (z e^{\alpha t})dt = [(z(t) e^{\alpha t})]_0^s = z(s)e^{\alpha s} - z(0)$ is wrong.  

---

