Solve Euler Integration for dx/dt = (x-at)/(x/a+t)

In summary, the conversation is about a person seeking help with Euler Integration and struggling with the notation and calculations involved. They have a time step and initial conditions, and are trying to calculate the output voltage at a specific time. They are using an Excel spreadsheet with columns for time, x(t), f(x,t), and ^x = ^t.f(x,t), and are unsure about how to calculate the error value and continue with the iteration. The conversation also includes a discussion about making the notation clearer and the inclusion of an "exact" column, which is obtained by solving the differential equation. The person eventually figures out how to move on with the iteration by adding Δ(t).f(x,t) to x(t).
  • #1
Jimbo
10
0
Hi

Im a bit stuck on the method for Euler Integration. I have the following first order differential equation:

dx/dt = (x-at) / (x / a+t)

where constant a = 1.0V/s, and initial condition x = 1.0V at t=0s

I have a time step of 0.02 and I need to calculate the output voltage at a time t = 0.2s

So I have the Euler Integration formula: x(t + ^t) = x(t) + ^t.f(x,t)
and I've started putting the values into an Excel spreadsheet, with columns as follows:

t | x(t) | f(x,t) | ^x = ^t.f(x,t)

I have values for all the first row for these columns but an example in a textbook has an additional column called x(exact) which appears to calculate an error value? I am not sure how to calculate this value, and am also unsure about how to move on with the iteration? What values should I move down for further rows?

I have searched the web but can't find any sites I can make sense of - can anybody help me? I hope my question makes sense...

Thanks

Jimbo :)
 
Mathematics news on Phys.org
  • #2
Hi Jimbo, and welcome to PF.

Originally posted by Jimbo
So I have the Euler Integration formula: x(t + ^t) = x(t) + ^t.f(x,t)
and I've started putting the values into an Excel spreadsheet, with columns as follows:

This bit I don't understand. Could you try to clear that up? If you are trying to do superscripts, do this:

x[ sup ]2[ /sup ]

with no spaces in the brackets. The result will be:

x2

Thanks,
 
  • #3
Thanks

Hi

Thanks for your reply

Sorry about the unclear formula - the ^ were meant to be deltas to signify the small change in t

x(t + delta(t)) = x(t) + delta(t).f(x,t)

Hope that makes more sense now

Jimbo :)
 
  • #4


Originally posted by Jimbo
x(t + delta(t)) = x(t) + delta(t).f(x,t)

OK, that helps. If you want to make it look prettier, check the Announcement at the top of the forum Howto: Making Math Symbols.

& Delta ;

without the spaces gives you:

Δ

Oooohhhh! Pretty!

Hope that makes more sense now

We're getting there, but I don't know what f(x,t) is. [?]

edit: typo
 
  • #5
Here is what I have on Euler's Method,

Given
y' = f(x,y)
y(a)= y0

For a solution over the interval [a,b]
Choose a step h=(b-a)/N. Set xn= a + nh for n= 0,1,2...N

yn+1 = yn+ hf(xn,yn)

Error = h2y''(ξ)/2

Where xn < &xi; < xn+ h

I am haveing trouble intrepeting your notation, perhaps you can apply my notation to your problem.

Edit: Typo+ some content
 
Last edited:
  • #6
I just reread your initial post, you did say EXACT and not error term. The ONLY way to generate the exact solution is to solve the DE. This solution is what Eulers, or any other numerical method, is approximating.
 
  • #7
My textbook has an "exact" column too. That's not part of the Euler's method computation. It's there just for purposes of the example, to show you the amount of the error in the Euler approximation.

As Integral said, that value was obtained by solving the DE (i.e. by integration), then evaluating the solution for various values of t so that the error could be determined for each iteration.
 
  • #8
Thanks

Hi

Thanks very much everyone for your help

I have it sorted now. gnome was correct about the exact column not being part of the calculation.

To move onto the next iteration I needed to add the value &Delta;(t).f(x,t) to x(t) to get a new value for x(t)

Thanks again

Jimbo :)
 

1. What is Euler integration?

Euler integration is a numerical method for approximating the solution to a first-order differential equation. It involves breaking down the differential equation into small steps and using a linear approximation to estimate the value of the solution at each step.

2. How is Euler integration used to solve differential equations?

Euler integration is used to solve differential equations by approximating the solution at discrete points in time. The differential equation is converted into a difference equation, and the solution is estimated by iteratively applying the difference equation to a given initial value.

3. What is the formula for Euler integration?

The formula for Euler integration is yi+1 = yi + hf(xi, yi), where yi is the estimated value of the solution at step i, h is the step size, and f(xi, yi) is the value of the differential equation at the current step.

4. How accurate is Euler integration?

Euler integration is a first-order method, meaning that the error in the estimated solution is proportional to the step size. Therefore, it is less accurate compared to higher-order methods such as Runge-Kutta. However, the accuracy can be improved by decreasing the step size.

5. What are the limitations of Euler integration?

Euler integration has some limitations, such as being a first-order method, which means it may not accurately capture the behavior of the solution at highly nonlinear points. It also requires a small step size for accurate results, which can be computationally expensive. Additionally, it may not work well for stiff differential equations, where the solution changes rapidly over small time intervals.

Similar threads

Replies
1
Views
635
Replies
2
Views
1K
  • General Math
Replies
11
Views
1K
Replies
20
Views
3K
  • General Math
2
Replies
38
Views
10K
Replies
5
Views
8K
Replies
7
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
557
  • General Math
Replies
7
Views
3K
  • Calculus
Replies
3
Views
2K
Back
Top