Metodo-de-dsolve-euler-modificado.docx

  • Uploaded by: Jhon Rengifo
  • 0
  • 0
  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Metodo-de-dsolve-euler-modificado.docx as PDF for free.

More details

  • Words: 1,036
  • Pages: 11
β€œUNIVERSIDAD NACIONAL DE SAN MARTIN” FACULTAD DE INGENIERIA AGROINDUSTRIAL DEPARTAMENTO ACADEMICO PROFESIONAL DE INGENIERIA AGROINDUSTRIAL

ASIGNATURA

TEMA

:

ALUMNO

DOCENTE

:

METODOS NUMERICOS

EJERCICIOS DE DSOLVE, EULER Y EULER MODIFICADO

:

GINO. J. RENGIFO GANOZA

:

ING. ARBEL DAVILA RIVERA

CICLO

:

TARAPOTO-PERU 2018

V

METODO β€œDSOLVE” ECUACIONES DIFERENCIALES 1) π‘₯

𝑑𝑦 + 2𝑦 = π‘₯𝑠𝑒𝑛(π‘₯) 𝑑π‘₯

𝑑𝑦 2𝑦 = 𝑠𝑒𝑛(π‘₯) βˆ’ 𝑑π‘₯ π‘₯ 𝑦=

𝑐 2 cos(π‘₯) βˆ’ π‘₯ 2 cos(π‘₯) + 2π‘₯𝑠𝑒𝑛(π‘₯) βˆ’ π‘₯2 π‘₯2

MATLAB >>Y=dsolve('Dy=sin(x)-2*Y/X','X'); >>simplify(y) ans= (c2+2*cos(x)+2*x*sin(x)/XαΆΊ2-COS(X) >>pretty(y) 𝑐2 2 cos(π‘₯) βˆ’ π‘₯ 2 cos(π‘₯) 2 π‘₯ sin(π‘₯) + π‘₯2 π‘₯2

2) 𝑑𝑦 = 𝑦𝑑 𝑑 𝑦 = 𝑒𝑑

𝑑𝑦 = 𝑒𝑑 = 𝑦 𝑑 𝑦 = 𝐢𝑒 𝑑 𝑦(0) = 1 C=1

MATLAB

>> dsolve('Dy=y ' , ' y (0)=1 ') ans = exp(t)

3) 𝑑𝑦 2𝑦 = 𝑑𝑑 𝑑 𝑦 = 𝑑2 𝑑𝑦 2𝑑 2 2𝑦 = 2𝑑 = = 𝑑𝑑 𝑑 𝑑 Y(-1)=1

MATLAB >> dsolve( 'Dy=2*y/t ' , ' y( -1 ) =1 ' ) ans = t^2 >> dsolve( 'Dy=2*y/x ' , ' y( - 1 ) = 1 ' , ' x ' ) ans = x^2

4) yο‚’ = 2x 𝑑𝑦 = 2π‘₯ 𝑑π‘₯ ∫ 𝑑𝑦 =∫ 2π‘₯ 𝑑π‘₯ y ο€½ π‘₯ 2+ C

MATLAB >>dsolve('Dy=2*x','x')

METODO DE EULER:

1)

𝑑𝑦 𝑑π‘₯

= 2π‘₯𝑦 ; 𝑦(0) = 1 ; 𝑦(0.5) =?

β„Ž=

0.5βˆ’0 5

= 0.1

Manual: π‘₯0 = 0.0

𝑦1 = 𝑦0 + β„Žπ‘“(2π‘₯0 𝑦0 ) 𝑦1 = 1 + 0.1(2(0.0)(1)) 𝑦1 = 1

π‘₯1 = π’™πŸŽ + 𝒉 = 0.0 + 0.1 = 0.1 π‘₯2 = 0.1 + 0.1 = 0.2 π‘₯3 = 0.2 + 0.1 = 0.3

𝑦2 = 1 + 0.1(2(0.1)(1)) 𝑦2 = 1.02

π‘₯4 = 0.3 + 0.1 = 0.4 π‘₯5 = 0.4 + 0.1 = 0.5 n

π‘₯𝑖+1 = π’™πŸŽ + 𝒉

π‘₯𝑖

𝑦1 = 𝑦0 + β„Žπ‘“(2π‘₯0 𝑦0 )

𝑦1

0 1 2 3 4 5

0 0.0 + 0.1 = 0.1 0.1 + 0.1 = 0.2 0.2 + 0.1 = 0.3 0.3 + 0.1 = 0.4 0.4 + 0.1 = 0.5

0 0.1 0,2 0,3 0,4 0,5

1,0 1+0,1(2(0,0)(0,1)) 1+0,1(2(0,1)(1)) 1,02+0,1(2(0,2)(1,02)) 1,0608+0,1(2(0,3)(1,0608)) 1,124448+0,1(2(0,4)(1,124448))

1,0000 1,000 1,02 1,0608 1,124448 1,214403

MATLAB: Ingrese la derivada:2*x*y Ingrese el valor de X inicial:0 Ingrese el valor de X final:0.5 Ingrese el valor de Y inicial:1 Ingrese el paso:0.1 n= 5 x y

0.0 1.0000 0.1 1.0000 0.2 1.0200 0.3 1.0608 0.4 1.1244 0.5 1.2144

2) 𝑦 β€² = π‘₯ 2 + 0.5𝑦 2 ; π‘₯0 = 1 ; 𝑦(1) = 2 ; 𝑦(1.3) =?

1.3βˆ’1 3

= 0.1

Manual: n π‘₯𝑖+1 = π’™πŸŽ + 𝒉

π‘₯𝑖

𝑦1 = 𝑦0 + β„Žπ‘“(π‘₯02 + 0.5𝑦02 )

𝑦1

1 1 + 0.1 = 1.1 1.1 + 0.1 = 1.2 1.2 + 0.1 = 1.3

1 1.1 1,2 1,3

2.0 2+0,1((1)2 +0,5(2)2 2,3+0,1((1,1)2 +0,5(2,3)2 ) 2,6855+0,1((1,2)2 +0,5(2,6855)2 )

2,00000 2,3000 2,6855 3,19009

0 1 2 3 MATLAB:

Ingrese la derivada:x^2+0.5*y^2 Ingrese el valor de X inicial:1 Ingrese el valor de X final:1.3 Ingrese el valor de Y inicial:2 Ingrese el paso:0.1 n= 3.0000 x

β„Ž=

y

1.0 2.0000

1.1 2.3000 1.2 2.6855 1.3 3.1901

METODO DE UELER MODIFICADO:

1)

𝑑𝑦 = 2π‘₯𝑦 ; 𝑦(0) = 1 ; 𝑦(0.5) =? 𝑑π‘₯

Manual: π‘₯0 = 0.0 π‘₯1 = π’™πŸŽ + 𝒉 = 0.0 + 0.1 = 0.1 π‘₯2 = 0.1 + 0.1 = 0.2 π‘₯3 = 0.2 + 0.1 = 0.3 π‘₯4 = 0.3 + 0.1 = 0.4 π‘₯5 = 0.4 + 0.1 = 0.5

β„Ž=

0.5 βˆ’ 0 = 0.1 5

𝑦1 = 𝑦0 + β„Žπ‘“(2π‘₯0 𝑦0 ) 𝑦1 = 1 + 0.1(2(0.0)(1)) 𝑦1 = 1

1 π‘π‘Ÿπ‘œπ‘š = [(2(π‘₯0 )(𝑦0 ) + (2(π‘₯1 )(𝑦1 )] 2 1 π‘π‘Ÿπ‘œπ‘š = [(2(0.0)(1) + (2(0.1)(1)] 2 𝑦1 = 0.1

𝑦(0,1) = 𝑦0 + β„Ž(π‘π‘Ÿπ‘œπ‘š) 𝑦1 = 1 + 0.1(0.1) 𝑦1 = 1.01

1 [(2(π‘₯0 )(𝑦0 ) + (2(π‘₯1 )(𝑦1 )] 2

π‘π‘Ÿπ‘œπ‘š

𝑦0 + β„Ž(π‘π‘Ÿπ‘œπ‘š)

1

1 [(2(0.0)(1) + (2(0.1)(1)] 2

0.1

1 + 0.1(0.1)

1.01 + 0.1(2(0.1)(1.01))

1.0302

1 [(2(0.1)(1.01) + (2(0.2)(1.0302)] 2

0.30704

1.01+0.1(0.30704)

1.040704

0.3

1.040704+0.1(2(0.2)(1.040704))

1.0823

0.53283

1.040704+0.1(0.53283)

1.093987

0.3 + 0.1

0.4

1.093987+0.1(2(0.3)(1.093987))

1.1596

0.79203

1.093987+0.1(0.79203)

1.17319

0.4 + 0.1

0.5

1.17319+0.1(2(0.4)(1.17319))

1.2670

1.102776

1.17319+0.1(1.102776)

1.2834

n

π‘₯1 = π’™πŸŽ + 𝒉

π‘₯1

𝑦1 = 𝑦0 + β„Žπ‘“(2π‘₯0 𝑦0 )

𝑦1

0

0

0

1.0

1.000

1

0.0 + 0.1

0.1

1 + 0.1(2(0.0)(1))

2

0.1 + 0.1

0.2

3

0.2 + 0.1

4 5

MATLAB: Ingrese la derivada:2*x*y Ingrese el valor de x:0 Ingrese el valor de x final:0.5 Ingrese el valor de y:1 Ingrese el paso:0.1 n= 5 x(n) yΒ΄(n), p hyΒ΄(n+1)

1 [(2(0.2)(1.040704) + (2(0.3)(1.0823)] 2 1 [(2(0.3)(1.093987) + (2(0.4)(1.1596)] 2 1 [(2(0.4)(1.17319) + (2(0.5)(1.2670)] 2

𝑦1

1.01

0.0 1.00000000 1.00000000 0.1 1.01000000 1.03020000 0.2 1.04070400 1.08233216 0.3 1.09398804 1.15962733 0.4 1.17319278 1.26704820 0.5 1.28347290 1.41182019 >>

2) 𝑦 β€² = π‘₯ 2 + 0.5𝑦 2 ; π‘₯0 = 1 ; 𝑦(1) = 2 ; 𝑦(1.3) =?

β„Ž=

1.3βˆ’1 3

= 0.1

Manual: 𝑦1 = 𝑦0 + β„Žπ‘“(π‘₯02 + 0.5𝑦02 ) 𝑦1 = 2 + 0.1(12 + 0.5(22 ) 𝑦1 = 2.3

1 π‘π‘Ÿπ‘œπ‘š = [𝑓(π‘₯02 + 0.5𝑦02 ) + 𝑓π‘₯12 + 0.5𝑦12 ] 2 1 2 π‘π‘Ÿπ‘œπ‘š = [(1 ) + 0.5(22 ) + (1.12 ) + 0.5(2.32 )] 2 𝑦1 = 3.4275

𝑦(0,1) = 𝑦0 + β„Ž(π‘π‘Ÿπ‘œπ‘š) 𝑦1 = 2 + 0.1(3.4275) 𝑦1 = 2.34275

n

π‘₯1 = π’™πŸŽ + 𝒉

π‘₯1

𝑦0 + β„Žπ‘“(π‘₯02 + 0.5𝑦02 )

𝑦1

0

1

1

2.0

2.000

1

1 + 0.1

1.1

2+0.1(12 + 0.5(22 )

2.3

2

1.1 + 0.1

1.2

2.34275+0.1(1.12 + 0.5(2.342752 )

2.7381

3

1.2 + 0.1

1.3

2.79989+0.1(1.22 + 0.5(2.799892 )

3.3358

MATLAB: Ingrese la derivada:x^2+0.5*y^2 Ingrese el valor de x:1 Ingrese el valor de x final:1.3 Ingrese el valor de y:2 Ingrese el paso:0.1 n= 3.0000 x(n) yΒ΄(n), p hyΒ΄(n+1)

1.0 2.00000000 2.30000000 1.1 2.34275000 2.73817388 1.2 2.79990184 3.33587436

1 [𝑓(π‘₯02 + 0.5𝑦02 ) + 𝑓π‘₯12 + 0.5𝑦12 ] 2

π‘π‘Ÿπ‘œπ‘š

𝑦0 + β„Ž(π‘π‘Ÿπ‘œπ‘š)

1 2 [(1 + 0.5(22 ) + 1.12 + 0.5(2.32 ) 2 1 [(1.12 + 0.5(2.342752 ) + 1.22 2 + 0.5(22.73812 ) 1 [(1.22 + 0.5(2.799892 ) + 1.32 2 + 0.5(3.33582 )

3.4275

2 + 0.1(3.4275)

2.34275

4.5714

2.34275+0.1(4.5714)

2.79989

6.306736

2.79989+0.1(6.306736)

3.4305

𝑦1

1.3 3.43058955 4.18803678 >>

More Documents from "Jhon Rengifo"

Quimica Alimentos Ii.docx
November 2019 10
Ciencias Naturales.docx
December 2019 16
December 2019 13