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

  • Context: Undergrad 
  • Thread starter Thread starter Jimbo
  • Start date Start date
  • Tags Tags
    Euler Integration
Click For Summary

Discussion Overview

The discussion revolves around the application of Euler Integration to solve a first-order differential equation given by dx/dt = (x-at) / (x/a+t). Participants explore the method of Euler Integration, the setup of calculations in a spreadsheet, and the interpretation of an "exact" solution column in relation to the numerical approximation.

Discussion Character

  • Homework-related
  • Technical explanation
  • Conceptual clarification

Main Points Raised

  • Jimbo presents a first-order differential equation and seeks assistance with Euler Integration, specifying initial conditions and a time step.
  • Some participants express confusion about Jimbo's notation and request clarification on the formula used for Euler Integration.
  • Jimbo clarifies that the symbols were meant to represent small changes in time (delta), improving understanding among participants.
  • One participant shares a general form of Euler's Method and suggests applying it to Jimbo's problem, although they express difficulty interpreting Jimbo's notation.
  • Another participant notes that the "exact" column in Jimbo's textbook is not part of the Euler method calculation but is used to show the error in the approximation.
  • Jimbo acknowledges the clarification regarding the "exact" column and confirms understanding of how to proceed with the iterations.

Areas of Agreement / Disagreement

Participants generally agree on the nature of the "exact" column and its purpose in illustrating the error of the Euler approximation. However, there is no consensus on the interpretation of Jimbo's initial notation until clarified.

Contextual Notes

Participants discuss the need for a clear understanding of notation and the steps involved in applying Euler Integration, highlighting the importance of precise communication in mathematical discussions.

Who May Find This Useful

Individuals interested in numerical methods for solving differential equations, particularly those learning about Euler Integration and its applications in computational contexts.

Jimbo
Messages
10
Reaction score
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 :)
 
Physics news on Phys.org
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,
 
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 :)
 


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
 
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:
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.
 
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.
 
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 :)
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
10K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
20
Views
4K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K