CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Differential equation solving (https://www.cfd-online.com/Forums/main/6807-differential-equation-solving.html)

cfd-user November 12, 2003 02:00

Differential equation solving
 
Hi I am new to cfd and just apreciate. If somebody tell me how to solve this differential equation anlytically. dy/dx=ax+y y=0 at x=0 Thanks cfd-user

Rami November 12, 2003 02:42

Re: Differential equation solving
 
Assuming a is constant, the solution is

y = a * (e^x - x - 1)

It is obtained as follows:

1. Find the homogenous solution, Yh, to the homogenous equation, i.e., dy/dx - y = 0. This is readily solved to yield Yh = e^x.

2. Guess a private solution, Yp, that satistfy the original equation. Since the inhomogenious term is a 1st degree polynomial, it is reasonable to guess Yp has also such a form, Yp=Ax+B. Substitution reveals A=B=-a.

3. The solution, y, is made of the linear combination y = C*Yh + Yp, where the constant C is found by satisfying the BC y(x=0)=0. Substitution and solving yields C=a.

You now have the above solution that satisfies the ODE and its BC (verify!). This is a general method for solving linear ODEs. It works for simple inhomogenous terms and BC. For other cases and better explanation on ODE solution refer to any basic calculus textbook.


All times are GMT -4. The time now is 04:36.