• Non ci sono risultati.

Do@t@i+1D =t@iD +h,8i, 0, n-1<D w@0D = Α

N/A
N/A
Protected

Academic year: 2021

Condividi "Do@t@i+1D =t@iD +h,8i, 0, n-1<D w@0D = Α"

Copied!
3
0
0

Testo completo

(1)

f@t_, y_D:=y ^ 3*t-y*t ^ 3 H*f@t_,y_D:=y*Exp@-Ht-3L^2D*L Α =1.;

tA=0.0; tB=1.2;

n=800;

h=HtB-tAL n;

t@0D =tA;

t@nD =tB;

Do@t@i+1D =t@iD +h,8i, 0, n-1<D w@0D = Α;

H* EULERO *L

Do@w@i+1D =w@iD +h*f@t@iD, w@iDD,8i, 0, n-1<D; sol=Table@8t@iD, w@iD<,8i, 0, n<D;

solnum=NDSolve@8y '@tD Šf@t, y@tDD, y@tAD Š Α<, y@tD,8t, tA, tB<D@@1DD; soltrue=DSolve@8y '@tD Šf@t, y@tDD, y@tAD Š Α<, y@tD, tD@@1DD

trange=8tA, tB<; yrange=80, 10<;

pl0=Plot@y@tD . soltrue,8t, tA, tB<, PlotRange®8trange, yrange<D; pl1=ListPlot@sol, PlotRange®8trange, yrange<D;

pl2=Plot@y@tD . solnum,8t, tA, tB<, PlotRange®8trange, yrange<D; H*pl3=

Plot@y@t.soltrue,8t,tA,tB<,PlotRange®8trange,yrange<,PlotStyle®RGBColor@1,0,0DD;*L Show@

pl0, pl1, pl2D

General::ovfl : Overflow occurred in computation. ‡ NDSolve::ndsz :

At t == 1.1294007156019532`, step size is effectively zero; singularity or stiff system suspected. ‡ DSolve::bvnul :

For some branches of the general solution, the given boundary conditions lead to an empty solution. ‡

:y@tD ® 2

2.ã

t4

2 -2.50663ã

t4

2 ErfB t2

2 F

>

0.0 0.2 0.4 0.6 0.8 1.0 1.2

0 2 4 6 8 10

(2)

H* RK2 *L

Do@k1=f@t@iD, w@iDD;

k2=f@t@iD +0.5*h, w@iD +0.5*h*k1D; w@i+1D =w@iD +h*k2,8i, 0, n-1<D; sol=Table@8t@iD, w@iD<,8i, 0, n<D;

solnum=NDSolve@8y '@tD Šf@t, y@tDD, y@tAD Š Α<, y@tD,8t, tA, tB<D@@1DD; H*soltrue=DSolve@8y'@tf@t,y@tDD,y@tADŠΑ<,y@tD,tD@@1DD*L

trange=8tA, tB<; yrange=80, 10<;

pl1=ListPlot@sol, PlotRange®8trange, yrange<D;

pl2=Plot@y@tD . solnum,8t, tA, tB<, PlotRange®8trange, yrange<D; H*pl3=

Plot@y@t.soltrue,8t,tA,tB<,PlotRange®8trange,yrange<,PlotStyle®RGBColor@1,0,0DD;*L Show@

pl1, pl2D

General::ovfl : Overflow occurred in computation. ‡ NDSolve::ndsz :

At t == 1.1294007156019532`, step size is effectively zero; singularity or stiff system suspected. ‡

0.0 0.2 0.4 0.6 0.8 1.0 1.2

0 2 4 6 8 10 2 ODE.nb

(3)

H* RK4 *L

Do@k1=f@t@iD, w@iDD;

k2=f@t@iD +0.5*h, w@iD +0.5*h*k1D;

k3=f@t@iD +0.5*h, w@iD +0.5*h*k2D; k4=f@t@iD +h, w@iD +h*k3D; w@i+1D =w@iD +h*Hk1+2*k2+2*k3+k4L 6.,8i, 0, n-1<D;

sol=Table@8t@iD, w@iD<,8i, 0, n<D;

solnum=NDSolve@8y '@tD Šf@t, y@tDD, y@tAD Š Α<, y@tD,8t, tA, tB<D@@1DD; H*soltrue=DSolve@8y'@tf@t,y@tDD,y@tADŠΑ<,y@tD,tD@@1DD*L

trange=8tA, tB<; yrange=80, 10<;

pl1=ListPlot@sol, PlotRange®8trange, yrange<D;

pl3=Plot@y@tD . solnum,8t, tA, tB<, PlotRange®8trange, yrange<D; H*pl3=

Plot@y@t.soltrue,8t,tA,tB<,PlotRange®8trange,yrange<,PlotStyle®RGBColor@1,0,0DD;*L Show@

pl1, pl3D

General::ovfl : Overflow occurred in computation. ‡ NDSolve::ndsz :

At t == 1.1294007156019532`, step size is effectively zero; singularity or stiff system suspected. ‡

0.0 0.2 0.4 0.6 0.8 1.0 1.2

0 2 4 6 8 10

ODE.nb 3

Riferimenti

Documenti correlati

Sodai si riserva di apportare modifiche senza preavviso ai prodotti declinando ogni responsabilita’ per danni diretti o indiretti derivanti da eventuali modifiche. I colori e

Le capacità innate dei bambini non pongono limiti all’acquisizione di una nuova lingua, mettendola allo stesso piano della lingua madre.. È un processo di apprendimento che avviene

Cure pediatriche di fine vita: dolore, sofferenza e limiti dell'intervento terapeutico.. 25 settembre 2019

The manner of suicide ranked as the 1 lth leading associated causes of death in the United States in 2001 (Table

Così una coppia (il fatto che qualcuno ci sia riuscito vuol dire che è una pista percorribile!), aiutati da un mediatore, hanno messo giù tutte le loro esigenze: lui e lei

The innovative geometry and design in addition to the best materials on the world- wide market (100% made in Hardox® and Strenx®) make iTALMEK scrap shears a piece of equipment

Si precisa che i suddetti servizi prevedono l’aggiornamento e l’erogazione quotidiana di informazioni attraverso i siti web e il canale digitale terrestre

(servis avec une fondue de Parmigiano Reggiano DOP froide &amp; des lamelles de truffe noire) Tagliolini à la