佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 3284|回复: 29

Euler Method的问题...

  [复制链接]
发表于 30-10-2011 09:48 AM | 显示全部楼层 |阅读模式
Y=X^2+Y,X=0.1,0.2,0.3,0.5 and 1..Y = -1 when X = 0,h = 0.1
要用euler method,modified euler 和runge kutta method找出来..怎么弄??我到现在还不了解这些算法...
回复

使用道具 举报


ADVERTISEMENT

发表于 30-10-2011 10:15 AM | 显示全部楼层
Y=X^2+Y
x^2=0
x=0

題目有問題吧!
回复

使用道具 举报

 楼主| 发表于 30-10-2011 10:39 AM | 显示全部楼层
Y=X^2+Y
x^2=0
x=0

題目有問題吧!
puangenlun 发表于 30-10-2011 10:15 AM



   哦..问题是说when X = 0,Y = -1..没错的话,X过后要replace为0.1,0.2....等等的..
要做10个step..怎么弄...
回复

使用道具 举报

发表于 30-10-2011 11:17 AM | 显示全部楼层
現在問題是
無論y是多少
x都是0

通常euler method的題目
都有牽涉到dy/dx
你確定題目沒有錯嗎?
回复

使用道具 举报

 楼主| 发表于 30-10-2011 02:14 PM | 显示全部楼层
現在問題是
無論y是多少
x都是0

通常euler method的題目
都有牽涉到dy/dx
你確定題目沒有錯嗎?
puangenlun 发表于 30-10-2011 11:17 AM


没错..全部题目是这样的...
tabulate the solution of Y = X^2 + Y at X = 0.1,0.2,0.3,0.5 and 1.0.given that Y = -1 when X = 0.Use the euler method,modified euler method and runge kutta method choosing h = 0.1.compare the result.
回复

使用道具 举报

发表于 30-10-2011 05:55 PM | 显示全部楼层
In mathematics and computational science, the Euler method, named after Leonhard Euler, is a first-order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration of ordinary differential equations and is the simplest kind of Runge-Kutta method.

這些方法都是solve ode的
所以我認為題目有問題
回复

使用道具 举报

Follow Us
 楼主| 发表于 30-10-2011 06:13 PM | 显示全部楼层
In mathematics and computational science, the Euler method, named after Leonhard Euler, is a first-o ...
puangenlun 发表于 30-10-2011 05:55 PM


很深奥,什么叫做solve ode
回复

使用道具 举报

 楼主| 发表于 30-10-2011 06:16 PM | 显示全部楼层
In mathematics and computational science, the Euler method, named after Leonhard Euler, is a first-o ...
puangenlun 发表于 30-10-2011 05:55 PM



   哦,明白了...这是我assignment的问题...但是其实我对这个数学不太行的,所以才想问看有没有人会

谢谢你的帮忙
回复

使用道具 举报


ADVERTISEMENT

发表于 30-10-2011 06:41 PM | 显示全部楼层
Euler method is a first-order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value

ode=ordinary differential equations

什麼課程的assignment?
回复

使用道具 举报

 楼主| 发表于 30-10-2011 06:48 PM | 显示全部楼层
Euler method is a first-order numerical procedure for solving ordinary differential equations (ODEs) ...
puangenlun 发表于 30-10-2011 06:41 PM



   engineering mathematics....你也有读degree的??
回复

使用道具 举报

发表于 30-10-2011 07:37 PM | 显示全部楼层
oic,怪不得
回复

使用道具 举报

 楼主| 发表于 30-10-2011 07:48 PM | 显示全部楼层
oic,怪不得
puangenlun 发表于 30-10-2011 07:37 PM



   怎么说???
回复

使用道具 举报

发表于 30-10-2011 07:51 PM | 显示全部楼层
一般上engineering的course才會學到這個

business的就不一定會學到這個
回复

使用道具 举报

 楼主| 发表于 30-10-2011 08:06 PM | 显示全部楼层
一般上engineering的course才會學到這個

business的就不一定會學到這個
puangenlun 发表于 30-10-2011 07:51 PM



   恩..engineering都学怪怪的东西的

这个真的没办法解??
回复

使用道具 举报

发表于 31-10-2011 11:03 AM | 显示全部楼层
當你還在學校的時候,這些知識真的是怪怪的
但是實際應用在工作的時候,可能會人命關天

題目的解答在二樓
回复

使用道具 举报

 楼主| 发表于 31-10-2011 01:12 PM | 显示全部楼层
當你還在學校的時候,這些知識真的是怪怪的
但是實際應用在工作的時候,可能會人命關天

題目的解答在二 ...
puangenlun 发表于 31-10-2011 11:03 AM


还真的没办法解
回复

使用道具 举报


ADVERTISEMENT

发表于 10-1-2012 02:05 AM | 显示全部楼层
本帖最后由 yipei 于 10-1-2012 02:46 AM 编辑

回复 1# harke86


  
In mathematics and computational science, the Euler method, named after Leonhard Euler, is a first-order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration of ordinary differential equations and is the simplest kind of Runge-Kutta method.

這些方法都是solve ode的
所以我認為題目有問題


题目没问题,ODE 是用 f'(x) 来算 value of f(x) in case of some problem can't to solve by using integration.


question :
y'=x^2 + y
at x=0.1, 0.2, 0.3, 0.5 and 1.0given y=-1 when x=x=0


if the question is y=x^2 + y, then you can solve by ODE because you already get the formula for f(x)
so you question given must be y'=x^2 + y but not y, because Euler, Runge - Kutta are solve the (ODE) problem from y'(x) to get estimated value of y but not solve from y(x) to get value of y, it is impossible.....


Euler method:
y1=y+f(x,y)(x-xo)


at x=0.1
y=-1 + f(0,-1)(0.1-0)
  = -1.1


at x=0.2
y = -1.1 + f(0.1,-1.1)(0.2-0.1)
   = -1.209


at x=0.3
y=-1.3259


at x=0.4
y= -1.44949


at x=0.5
y = -1.5784


and continue to use same formula to find to estimate value of f(x)
回复

使用道具 举报

发表于 10-1-2012 02:16 AM | 显示全部楼层
本帖最后由 yipei 于 10-1-2012 02:40 AM 编辑

回复 16# harke86


   modified euler method (Runge-Kutta one step method)

K1 = f(x, y)
K2 = f(x + 1/2 * h , y + 1/2 * h * K1)
y1 = y + h * K2


at x=0.1
K1 = f(0,-1) = -1
K2 = f(0+1/2 * 0.1 , -1+ 1/2 * 0.1 * -1) = -1.0475
y = -1 + 0.1 ( -1.0475) = --1.10474


at x=0.2
K1 = -1.09474
K2 = -1.136977
y = -1.2184377


at x=0.3
K1 = -1.1784377
K2 = -1.214859585
y = -1.339923659


at x = 0.4
K1 = -1.249923659
K2 = -1.199919842
y= -1.459915643


at x = 0.5
K1 = -1.299915643
K2 = -1.322411425
y= -1.592156786
.
.
.
.
.
.


and continue to use the same formula to estimate the value of f(x).....
回复

使用道具 举报

发表于 10-1-2012 02:22 AM | 显示全部楼层
回复 16# harke86


   Runge-Kutta Method:  (2 stage method)
K1 = f(x,y)
K2 = f(x+2/3 * h, y + 2/3 *h * K1)
y1 = y + h(1/4 K1 + 3/4 K2)

at x=0.1
K1 = -1.0
K2 = -1.06
y = -1.1045

at x= 0.2
K1= -1.0945
K2 = -1.14969
y = -1.218

at x= 0.3
K1=-1.178
K2= -1.2254
y = -1.3394

at x= 0.4
K1= -1.249357
K2=-1.288246
y = -1.467252

at x=0.5
K1 = -1.307252
K2 = -1.336624
y = -1.60018
。。。。。。。。。。。。。
。。。。。。。。。。。
。。。。。。。。。。。
。。。。。。。。。。。
。。。。。。。。。。。。
回复

使用道具 举报

发表于 10-1-2012 02:29 AM | 显示全部楼层
回复 16# harke86


   我不知道你的 Runge-Kutta 是多少 stage, 所以我用 2 stage 的,也叫 Heun Method.Classical Runge-Kutta Method 有 4 stage...
方法一样,只是 formula 不同:

K1 = f(x,y)
K2 = f(x+1/2 *h , y+ 1/2 *h *K1)
K3 = f(x+1/2 *h , y+ 1/2 *h *K2)
K4 = f(x+ h , y + h * K3)
y1 = y + h/6  * ( K1 + 2 * K2 + 2 * K3 + K4)


The answer will be the same, just the got a little bit different, but when you round of your answer, you will be get the same answer although you are using different method
Runge-Kutta 4 stage(Classical) will get the more accurate answer,
then the following method that get accurate answer is by using Heun Method (R-K 2 stage),
then is the modified euler method(R-K 1 stage) and then is using Euler method....
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 12-11-2024 10:47 AM , Processed in 0.141411 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表