We Know, differential equations have different applications in real life such as the law of…