diff --git a/html/introduction/01-ode_introduction.html b/html/introduction/01-ode_introduction.html index c6f9cafa..f597eca7 100644 --- a/html/introduction/01-ode_introduction.html +++ b/html/introduction/01-ode_introduction.html @@ -650,22 +650,19 @@ div.title {text-align: center;} + + +
+
+
+
+

An Intro to DifferentialEquations.jl

+
Chris Rackauckas
+ +
- - - -
-
-
- -
-

An Intro to DifferentialEquations.jl

-
Chris Rackauckas
- -
- -

Basic Introduction Via Ordinary Differential Equations

+

Basic Introduction Via Ordinary Differential Equations

This notebook will get you started with DifferentialEquations.jl by introducing you to the functionality for solving ordinary differential equations (ODEs). The corresponding documentation page is the ODE tutorial. While some of the syntax may be different for other types of equations, the same general principles hold in each case. Our goal is to give a gentle and thorough introduction that highlights these principles in a way that will help you generalize what you have learned.

Background

If you are new to the study of differential equations, it can be helpful to do a quick background read on the definition of ordinary differential equations. We define an ordinary differential equation as an equation which describes the way that a variable $u$ changes, that is

@@ -730,17 +727,17 @@

First Model: Exponential Growth

retcode: Success Interpolation: Automatic order switching interpolation t: 5-element Array{Float64,1}: - 0.0 + 0.0 0.10042494449239292 0.35218603951893646 - 0.6934436028208104 - 1.0 + 0.6934436028208104 + 1.0 u: 5-element Array{Float64,1}: - 1.0 + 1.0 1.1034222047865465 1.4121908848175448 - 1.9730384275623003 - 2.664456142481452 + 1.9730384275622996 + 2.664456142481451 @@ -755,7 +752,7 @@

Analyzing the Solution

- +

From the picture we see that the solution is an exponential curve, which matches our intuition. As a plot recipe, we can annotate the result using any of the Plots.jl attributes. For example:

@@ -766,7 +763,7 @@

Analyzing the Solution

- +

Using the mutating plot! command we can add other pieces to our plot. For this ODE we know that the true solution is $u(t) = u_0 exp(at)$, so let's add some of the true solution to our plot:

@@ -776,7 +773,7 @@

Analyzing the Solution

- +

In the previous command I demonstrated sol.t, which grabs the array of time points that the solution was saved at:

@@ -788,10 +785,10 @@

Analyzing the Solution

 5-element Array{Float64,1}:
- 0.0                
+ 0.0
  0.10042494449239292
  0.35218603951893646
- 0.6934436028208104 
+ 0.6934436028208104
  1.0
 
@@ -806,11 +803,11 @@

Analyzing the Solution

 5-element Array{Float64,1}:
- 1.0               
+ 1.0
  1.1034222047865465
  1.4121908848175448
- 1.9730384275623003
- 2.664456142481452
+ 1.9730384275622996
+ 2.664456142481451
 
@@ -824,11 +821,11 @@

Analyzing the Solution

 5-element Array{Float64,1}:
- 1.0               
+ 1.0
  1.2038471492789395
  1.7643769243364813
- 2.6664820303831105
- 3.664456142481452
+ 2.66648203038311
+ 3.664456142481451
 
@@ -844,17 +841,17 @@

Analyzing the Solution

retcode: Success Interpolation: Automatic order switching interpolation t: 5-element Array{Float64,1}: - 0.0 + 0.0 0.10042494449239292 0.35218603951893646 - 0.6934436028208104 - 1.0 + 0.6934436028208104 + 1.0 u: 5-element Array{Float64,1}: - 1.0 + 1.0 1.1034222047865465 1.4121908848175448 - 1.9730384275623003 - 2.664456142481452 + 1.9730384275622996 + 2.664456142481451 @@ -867,7 +864,7 @@

Analyzing the Solution

-1.5542610480553116
+1.554261048055312
 
@@ -885,24 +882,24 @@

Controlling the Solver

retcode: Success Interpolation: Automatic order switching interpolation t: 9-element Array{Float64,1}: - 0.0 + 0.0 0.04127492324135852 0.14679917846877366 0.28631546412766684 - 0.4381941361169628 - 0.6118924302028597 - 0.7985659100883337 - 0.9993516479536952 - 1.0 + 0.4381941361169628 + 0.6118924302028597 + 0.7985659100883337 + 0.9993516479536952 + 1.0 u: 9-element Array{Float64,1}: - 1.0 + 1.0 1.0412786454705882 1.1547261252949712 1.3239095703537043 1.5363819257509728 1.8214895157178692 2.1871396448296223 - 2.662763824115295 + 2.662763824115295 2.664456241933517 @@ -916,7 +913,7 @@

Controlling the Solver

- +

Notice that by decreasing the tolerance, the number of steps the solver had to take was 9 instead of the previous 5. There is a trade off between accuracy and speed, and it is up to you to determine what is the right balance for your problem.

Another common option is to use saveat to make the solver save at specific time points. For example, if we want the solution at an even grid of t=0.1k for integers k, we would use the command:

@@ -943,17 +940,17 @@

Controlling the Solver

0.9 1.0 u: 11-element Array{Float64,1}: - 1.0 - 1.1029627851292922 + 1.0 + 1.102962785129292 1.2165269512238264 - 1.341783821227542 + 1.341783821227542 1.4799379510586077 - 1.6323162070541606 - 1.8003833264983586 - 1.9857565541588764 - 2.1902158127997704 - 2.4157257420844966 - 2.664456142481452 + 1.632316207054161 + 1.8003833264983584 + 1.9857565541588758 + 2.1902158127997695 + 2.415725742084496 + 2.664456142481451 @@ -974,8 +971,8 @@

Controlling the Solver

0.9 u: 3-element Array{Float64,1}: 1.2165269512238264 - 1.9857565541588764 - 2.4157257420844966 + 1.9857565541588758 + 2.415725742084496 @@ -991,17 +988,17 @@

Controlling the Solver

retcode: Success Interpolation: 1st order linear t: 5-element Array{Float64,1}: - 0.0 + 0.0 0.10042494449239292 0.35218603951893646 - 0.6934436028208104 - 1.0 + 0.6934436028208104 + 1.0 u: 5-element Array{Float64,1}: - 1.0 + 1.0 1.1034222047865465 1.4121908848175448 - 1.9730384275623003 - 2.664456142481452 + 1.9730384275622996 + 2.664456142481451 @@ -1020,8 +1017,8 @@

Controlling the Solver

0.0 1.0 u: 2-element Array{Float64,1}: - 1.0 - 2.664456142481452 + 1.0 + 2.664456142481451 @@ -1039,7 +1036,7 @@

Controlling the Solver

t: 1-element Array{Float64,1}: 1.0 u: 1-element Array{Float64,1}: - 2.664456142481452 + 2.664456142481451 @@ -1059,23 +1056,23 @@

Choosing Solver Algorithms

retcode: Success Interpolation: specialized 3rd order "free" stiffness-aware interpolation t: 8-element Array{Float64,1}: - 0.0 + 0.0 0.05653299582822294 0.17270731152826024 - 0.3164602871490142 - 0.5057500163821153 - 0.7292241858994543 - 0.9912975001018789 - 1.0 + 0.3164602871490142 + 0.5057500163821153 + 0.7292241858994543 + 0.9912975001018789 + 1.0 u: 8-element Array{Float64,1}: - 1.0 + 1.0 1.0569657840332976 1.1844199383303913 1.3636037723365293 1.6415399686182572 - 2.043449143475479 - 2.6418256160577602 - 2.6644526430553808 + 2.0434491434754793 + 2.641825616057761 + 2.6644526430553817 @@ -1092,27 +1089,27 @@

Choosing Solver Algorithms

retcode: Success Interpolation: specialized 4th order "free" interpolation t: 10-element Array{Float64,1}: - 0.0 + 0.0 0.028970819746309166 - 0.10049147151547619 - 0.19458908698515082 - 0.3071725081673423 - 0.43945421453622546 - 0.5883434923759523 - 0.7524873357619015 - 0.9293021330536031 - 1.0 + 0.10049147151547619 + 0.19458908698515082 + 0.3071725081673423 + 0.43945421453622546 + 0.5883434923759523 + 0.7524873357619015 + 0.9293021330536031 + 1.0 u: 10-element Array{Float64,1}: - 1.0 + 1.0 1.0287982807225062 1.1034941463604806 1.2100931078233779 - 1.351248605624241 - 1.538280340326815 + 1.351248605624241 + 1.538280340326815 1.7799346012651116 - 2.0905717422346277 - 2.4861021714470244 - 2.6644562434913373 + 2.090571742234628 + 2.486102171447025 + 2.6644562434913377 @@ -1200,46 +1197,46 @@

Systems of ODEs: The Lorenz Equation

retcode: Success Interpolation: Automatic order switching interpolation t: 1294-element Array{Float64,1}: - 0.0 + 0.0 3.5678604836301404e-5 0.0003924646531993154 0.0032624077544510573 - 0.009058075635317072 - 0.01695646895607931 - 0.0276899566248403 - 0.041856345938267966 - 0.06024040228733675 - 0.08368539694547242 - ⋮ - 99.39403070915297 - 99.47001147494375 - 99.54379656909015 - 99.614651558349 - 99.69093823148101 - 99.78733023233721 - 99.86114450046736 - 99.96115759510786 - 100.0 + 0.009058075635317072 + 0.01695646895607931 + 0.0276899566248403 + 0.041856345938267966 + 0.06024040228733675 + 0.08368539694547242 + ⋮ + 99.39403070915297 + 99.47001147494375 + 99.54379656909015 + 99.614651558349 + 99.69093823148101 + 99.78733023233721 + 99.86114450046736 + 99.96115759510786 + 100.0 u: 1294-element Array{Array{Float64,1},1}: - [1.0, 0.0, 0.0] + [1.0, 0.0, 0.0] [0.9996434557625105, 0.0009988049817849058, 1.781434788799208e-8] - [0.9961045497425811, 0.010965399721242457, 2.146955365838907e-6] - [0.9693591634199452, 0.08977060667778931, 0.0001438018342266937] - [0.9242043615038835, 0.24228912482984957, 0.0010461623302512404] - [0.8800455868998046, 0.43873645009348244, 0.0034242593451028745] - [0.8483309877783048, 0.69156288756671, 0.008487623500490047] - [0.8495036595681027, 1.0145425335433382, 0.01821208597613427] - [0.9139069079152129, 1.4425597546855036, 0.03669381053327124] - [1.0888636764765296, 2.052326153029042, 0.07402570506414284] - ⋮ - [12.999157033749652, 14.10699925404482, 31.74244844521858] - [11.646131422021162, 7.2855792145502845, 35.365000488215486] - [7.777555445486692, 2.5166095828739574, 32.030953593541675] - [4.739741627223412, 1.5919220588229062, 27.249779003951755] - [3.2351668945618774, 2.3121727966182695, 22.724936101772805] - [3.310411964698304, 4.28106626744641, 18.435441144016366] - [4.527117863517627, 6.895878639772805, 16.58544600757436] - [8.043672261487556, 12.711555298531689, 18.12537420595938] + [0.9961045497425811, 0.010965399721242457, 2.146955365838907e-6] + [0.9693591634199452, 0.08977060667778931, 0.0001438018342266937] + [0.9242043615038835, 0.24228912482984957, 0.0010461623302512404] + [0.8800455868998046, 0.43873645009348244, 0.0034242593451028745] + [0.8483309877783048, 0.69156288756671, 0.008487623500490047] + [0.8495036595681027, 1.0145425335433382, 0.01821208597613427] + [0.9139069079152129, 1.4425597546855036, 0.03669381053327124] + [1.0888636764765296, 2.052326153029042, 0.07402570506414284] + ⋮ + [12.999157033749652, 14.10699925404482, 31.74244844521858] + [11.646131422021162, 7.2855792145502845, 35.365000488215486] + [7.777555445486692, 2.5166095828739574, 32.030953593541675] + [4.739741627223412, 1.5919220588229062, 27.249779003951755] + [3.2351668945618774, 2.3121727966182695, 22.724936101772805] + [3.310411964698304, 4.28106626744641, 18.435441144016366] + [4.527117863517627, 6.895878639772805, 16.58544600757436] + [8.043672261487556, 12.711555298531689, 18.12537420595938] [9.97537965430362, 15.143884806010783, 21.00643286956427] @@ -1283,7 +1280,7 @@

Systems of ODEs: The Lorenz Equation

 3×1294 Array{Float64,2}:
  1.0  0.999643     0.996105    0.969359     …   4.52712   8.04367   9.97538
- 0.0  0.000998805  0.0109654   0.0897706        6.89588  12.7116   15.1439 
+ 0.0  0.000998805  0.0109654   0.0897706        6.89588  12.7116   15.1439
  0.0  1.78143e-8   2.14696e-6  0.000143802     16.5854   18.1254   21.0064
 
@@ -1296,7 +1293,7 @@

Systems of ODEs: The Lorenz Equation

- +

If we instead want to plot values against each other, we can use the vars command. Let's plot variable 1 against variable 2 against variable 3:

@@ -1306,7 +1303,7 @@

Systems of ODEs: The Lorenz Equation

- +

This is the classic Lorenz attractor plot, where the x axis is u[1], the y axis is u[2], and the z axis is u[3]. Note that the plot recipe by default uses the interpolation, but we can turn this off:

@@ -1316,7 +1313,7 @@

Systems of ODEs: The Lorenz Equation

- +

Yikes! This shows how calculating the continuous solution has saved a lot of computational effort by computing only a sparse solution and filling in the values! Note that in vars, 0=time, and thus we can plot the time series of a single component like:

@@ -1326,7 +1323,7 @@

Systems of ODEs: The Lorenz Equation

- +

Internal Types

The last basic user-interface feature to explore is the choice of types. DifferentialEquations.jl respects your input types to determine the internal types that are used. Thus since in the previous cases, when we used Float64 values for the initial condition, this meant that the internal values would be solved using Float64. We made sure that time was specified via Float64 values, meaning that time steps would utilize 64-bit floats as well. But, by simply changing these types we can change what is used internally.

@@ -1349,52 +1346,48 @@

Internal Types

 retcode: Success
 Interpolation: Automatic order switching interpolation
-t: 11-element Array{Float64,1}:
- 0.0                
- 0.04315877410281615
- 0.10749821507777302
- 0.1798183032337637 
- 0.27732622431309095
- 0.3943300853390046 
- 0.5271275340166153 
- 0.6593505063074551 
- 0.7998387276496801 
- 0.9661257382228796 
- 1.0                
-u: 11-element Array{Array{Float64,2},1}:
- [0.306624934095197 0.5338066435533153; 0.19874765604983802 0.6868676641729
-416; 0.6862329122068349 0.13858963914056321; 0.2031754356279607 0.805431744
-4734056]   
- [0.2607854140452007 0.3613260168142186; 0.3061733660115813 0.6130920806716
-098; 0.6484554422419746 0.09909176566962785; 0.33528190215003106 0.97147927
-48298231]  
- [0.13596497914872052 0.02539146709353668; 0.39275624859948677 0.4140338403
-5184776; 0.6235490412546256 0.1171227635342626; 0.5191531472173252 1.191169
-1282105947]
- [-0.08267310627767702 -0.4573896273601639; 0.3952152446091268 0.0883641473
-6267606; 0.6581128735546947 0.27062599647166163; 0.6975117123588294 1.38567
-9442209257]
- [-0.49551765265574466 -1.2570950504304415; 0.27500883360229983 -0.45014272
-42424515; 0.8439611836541472 0.7435773073443797; 0.8693546862420823 1.53201
-7905622345]
- [-1.1251069448214652 -2.3625200085353635; 0.037325541951849256 -1.08123128
-50121293; 1.3260226380299647 1.765626779016673; 0.9330006745006937 1.480132
-4753451832]
- [-1.9045113695239797 -3.6235436930157006; -0.16220499769796015 -1.46363209
-84855904; 2.246749925213862 3.5332898325322093; 0.7601909703615497 1.043513
-9453705078]
- [-2.5636091056660977 -4.5900120441897645; -0.02547223902998061 -1.09470953
-18805466; 3.510744970192141 5.809641306139268; 0.2774234486076798 0.1395762
-174433236] 
- [-2.8588358769826323 -4.8675661833207755; 0.7924931322952213 0.55502678447
-71868; 5.042857181653392 8.434977730075753; -0.6037853546431378 -1.36780693
-54307625]  
- [-2.2056076203133 -3.4860281122307057; 3.002992564478892 4.630325770000123
-; 6.583433020832067 10.916694329795456; -2.0967627480607884 -3.801465962226
-624]       
- [-1.8905678647543251 -2.903621089761297; 3.6371785566754515 5.759661435694
-562; 6.784809971693031 11.212684216367514; -2.446836669801699 -4.3599865292
-66994]
+t: 10-element Array{Float64,1}:
+ 0.0
+ 0.04507941711835774
+ 0.11847045464115312
+ 0.20200309476486217
+ 0.3080378088437111
+ 0.439160679844409
+ 0.5919747863019895
+ 0.7562936017032477
+ 0.9265969111145607
+ 1.0
+u: 10-element Array{Array{Float64,2},1}:
+ [0.6476678183071587 0.41891793301301194; 0.3373999272887971 0.963528121360
+1437; 0.5468425532557133 0.17626705828817868; 0.9493868101674328 0.09487393
+434072056]
+ [0.4256767292585334 0.41231921313397935; 0.34922238566772923 0.96187293443
+56894; 0.4982465643013043 0.10627425240908965; 1.234722752676834 0.12970737
+289976686]
+ [-0.09290252108890362 0.38465587787593475; 0.19096610037471526 0.921693193
+9107806; 0.5510997009878782 0.00020087347413948187; 1.6534348612956478 0.17
+966764893036533]
+ [-0.9065853042010712 0.3296827654989794; -0.20684622708033182 0.8262651140
+896179; 0.8665055551385252 -0.10280223723656501; 2.0294639518599102 0.22508
+53888535099]
+ [-2.2273319234509366 0.2291244752377739; -0.9053834435996413 0.64545781711
+1385; 1.7526878217563326 -0.19631004525493106; 2.2883756480783064 0.2632704
+732032627]
+ [-4.128848100344415 0.06959791120144104; -1.7172505457746334 0.36581564566
+38496; 3.7098223854217487 -0.24009807935656147; 2.150642100420188 0.2779803
+867598425]
+ [-6.257657785592031 -0.1397156646055227; -1.863819609800419 0.028627362227
+357456; 7.171666971637375 -0.17830359561673753; 1.1676069082173322 0.247516
+76873745765]
+ [-7.547964822508019 -0.3506781612472547; 0.022210478300666026 -0.255165558
+48465294; 11.823459685438586 0.019068400607233082; -1.0493451877105624 0.15
+660850772605645]
+ [-6.4608155283414375 -0.4955214737958298; 5.320972335742665 -0.36600230940
+56092; 16.312436567840216 0.32767097272117; -4.609304249155667 0.0007086456
+408165187]
+ [-4.854234662231447 -0.5178857881046955; 8.819130783690689 -0.336592437141
+38454; 17.587712014096375 0.4741650930425332; -6.45918723825745 -0.08411990
+025979836]
 
@@ -1408,10 +1401,10 @@

Internal Types

 4×2 Array{Float64,2}:
- 0.135965  0.0253915
- 0.392756  0.414034 
- 0.623549  0.117123 
- 0.519153  1.19117
+ -0.0929025  0.384656
+  0.190966   0.921693
+  0.5511     0.000200873
+  1.65343    0.179668
 
@@ -1425,10 +1418,10 @@

Internal Types

 4×2 Array{BigFloat,2}:
- 0.306625  0.533807
- 0.198748  0.686868
- 0.686233  0.13859 
- 0.203175  0.805432
+ 0.647668  0.418918
+ 0.3374    0.963528
+ 0.546843  0.176267
+ 0.949387  0.0948739
 
@@ -1444,68 +1437,55 @@

Internal Types

 retcode: Success
 Interpolation: Automatic order switching interpolation
-t: 6-element Array{Float64,1}:
- 0.0                
- 0.11309299507432245
- 0.34314692151136   
- 0.638787912178119  
- 0.9249800093396419 
- 1.0                
-u: 6-element Array{Array{BigFloat,2},1}:
- [0.306624934095196977068553678691387176513671875 0.53380664355331530757098
-3350160531699657440185546875; 0.1987476560498380173669374926248565316200256
-34765625 0.6868676641729416498804994262172840535640716552734375; 0.68623291
-22068349107621543225832283496856689453125 0.1385896391405632144255832827184
-3492984771728515625; 0.203175435627960698781180326477624475955963134765625 
-0.805431744473405597517512433114461600780487060546875]                     
-                                                                           
-                                                                           
-                                                               
- [0.12195360456574192164308358623413396755370929614133176343692674857595920
-89283282 -0.008123130290881944410204034456520484439167574288627050549707058
-882818710342921869; 0.39634232463333060475342878723397023611671692453560022
-20324236305738155185910297 0.3922711469618407524571385921694548208680191059
-529293489153371312310947138743918; 0.62360874142229614660269413816440946870
-87370580824993887652107972174806719590678 0.1236409384743709259797972837855
-357447990439632298887694654224199400105772431161; 0.53416347348269343867994
-57018811739572433059005299242711070019148084150545073337 1.2083846743849025
-18564024515351644107890176707970397695234248206414887624922368]
- [-0.8361838634484524348538168488462141801511078402805525410153586829197726
-692808571 -1.86702009280275907517976463220718291159544885656355164272253725
-3422383845174623; 0.1453811433020334574482407049325057368670470738112201107
-235484165871856652496102 -0.82134478429799790787504938541531905469749406674
-00386286734161179476112442392394; 1.077771068365623680961642145379083157281
-57412606957580092742711657289164482844 1.2553877009621635276525343870881896
-86801854167614311182221002263583654514473809; 0.927145045985413897479125565
-3032764995985712313551139615976505988068257946842391 1.53723087864554990641
-4797277498265984897737315208334480701715945474510318806641]    
- [-2.4781841695365935139189432377168542891767829957296609122941866219442182
-78896451 -4.473442094117027675809815446775958785211969683715454078985814799
-39549300369079; -0.08006364569705258042016347463273375867687218500322261325
-409698105571951190333812 -1.21777113075278823531712886538386589247841244623
-8940453398155952886774203517709; 3.2966315204870468195194565552806077969134
-38470665102008643034908539507467653621 5.4321316110811692416608908089319752
-02884242133404203141998361295001144659681931; 0.374349345424851256103484671
-6131550426370925361654115708204641548117654790737735 0.31282775172215700341
-93926449343762287138753819339916998491633864398598808831969]   
- [-2.4975818474654782027132192616937496987044671987510889796984588261379768
-8739931 -4.0447100330112030751965498675045126574427038896461677180992339776
-29276787366896; 2.317330136264621470670536733728552342915045303595855998302
-506298055630934243305 3.393959417472666081039083941359688764565665061035505
-721605949015682598273199206; 6.27290836063364715834215598699423777433297061
-3699990873953739050279600565477863 10.4376619318291287301568866309489208220
-0057863455139268312561945612660615303942; -1.689055448264079339133670789291
-3297438964986327492426444109202910454414785522 -3.1459536741694805543316146
-72864919967432018745488031128508039324887463085414649]         
- [-1.8905635653064640482754048965318043472960738675217969596201048475534655
-62833882 -2.903613161693912596462335234152228047992884765645552376599867304
-615746874344366; 3.63719468066918806341320932471563124940388939900708102008
-3798980087192646198465 5.75968789300718216160605225298983954645231221977570
-3753148103416886321220703276; 6.7848191643649295916304519941107790356057684
-47698696199506860813363339546739066 11.212699088749110671833971366870494546
-78391245938108692830749133496976192597072; -2.44684488609446281136992003045
-2810812989399961122674021029527293419007432081828 -4.3600004123377005404380
-03490097475473389116618818531156433722540001840908844477]
+t: 5-element Array{Float64,1}:
+ 0.0
+ 0.17497857103926084
+ 0.4439275929023296
+ 0.7642242008773308
+ 1.0
+u: 5-element Array{Array{BigFloat,2},1}:
+ [0.647667818307158693613700961577706038951873779296875 0.41891793301301194
+49648873342084698379039764404296875; 0.337399927288797085722649171657394617
+7959442138671875 0.9635281213601436522964149844483472406864166259765625; 0.
+5468425532557132928701548735261894762516021728515625 0.17626705828817867960
+36749365157447755336761474609375; 0.949386810167432759755001825396902859210
+968017578125 0.094873934340720555979942218982614576816558837890625]
+ [-0.6188960718824867728111531556212146524949095780924259719976415096764764
+328853145 0.350025724727944325527352372764937485241365601570147495385611666
+7637687099794473; -0.057412938226884432316635849574696464500327781088923530
+80169171374688759803887639 0.8623492198341470171269830534140466995712928986
+42001530629858438609707541610597; 0.730830422039167874412886202539929181834
+9160050300403416934309517614885038098399 -0.0719500558190700839855463189018
+58825992818683047468246048115314298322948926955; 1.921921566676164070426322
+590181246269924957280627105927292830364362298733317165 0.211806529814231327
+651933207068220677681742627450599773431112575139035117075195]
+ [-4.1997669287267147169391976434767379850646610405312981085368073326870987
+25183149 0.0632909583119936047452127680905314781106629595769808862495179252
+6641919769169438; -1.739226243945377437318983891388445419559172390813637142
+588074300773393372319632 0.355094171967641942812311369721542488996880766246
+9011825633568253151317250346457; 3.7994415851571118395489096177427030106542
+30855980402848403493234311687334061043 -0.240040385360714967337281449860542
+1432741151234222669853258429630248013616597714; 2.1342997898784534744128401
+97099997792747907428018703255828946271337100277035398 0.2778129646905650064
+883834316803775809636862936168576804197792563118823674230252]
+ [-7.5635512949525797927949237518032093449428326700525292289291773036652796
+49609056 -0.359589080931816041778274733542243024898769896362352799955755614
+1431160819565173; 0.1862205157110664936856878569541139182155636270857145381
+133507350572428610856458 -0.26515911468581138681760562313054271133704704751
+81561248041565659738152855106581; 12.05431806309802860670638993980073223117
+857302037974047209355120471242496823729 0.031553695837354823179825976343019
+31487277744908679032615947778197444938754169989; -1.18786590343927458966909
+3217063069348886133043261187402566500292679209499910705 0.15071010444668137
+92448321002998387316937047640415334786393236917659415826738098]
+ [-4.8542206937576882564244759249217889671318308807556438856671108319996396
+02571092 -0.517887020234393120656393235045404158630451221929817719450711184
+0483049182615223; 8.8191934867588965211288250323890056203823702461277205988
+46190502079399786992563 -0.336592778003760157180119686025267750085679814246
+8833446195818220913662496243523; 17.587754503667084597189849090570633675689
+01898252112314409231412997820949762859 0.4741671562762803743232805602407211
+8466898851204272954923370182014612097307014; -6.459220498627576364853929880
+791182121539549410534385679122916896743221109454275 -0.08412093627352932890
+56555683394033546032208048602145884638143934414391894387034]
 
@@ -1516,8 +1496,8 @@

Internal Types

--0.836183863448452434853816848846214180151107840280552541015358682919772669
-2808571
+-4.199766928726714716939197643476737985064661040531298108536807332687098725
+183149
 
@@ -1533,74 +1513,58 @@

Internal Types

 retcode: Success
 Interpolation: Automatic order switching interpolation
-t: 6-element Array{BigFloat,1}:
- 0.0                                                                       
-       
- 0.113092995074322453107164827202916505594705516625996223111945149913284021
-3685782
- 0.343146921511359988812756981258199791752946439061231935036208672177190552
-5139586
- 0.638787912178119045475686716403453696145703840976671770300362717636169010
-3911218
- 0.924980009339641787803025370802957820064305280645527971524647529343989238
-2198667
- 1.0                                                                       
-       
-u: 6-element Array{Array{BigFloat,2},1}:
- [0.306624934095196977068553678691387176513671875 0.53380664355331530757098
-3350160531699657440185546875; 0.1987476560498380173669374926248565316200256
-34765625 0.6868676641729416498804994262172840535640716552734375; 0.68623291
-22068349107621543225832283496856689453125 0.1385896391405632144255832827184
-3492984771728515625; 0.203175435627960698781180326477624475955963134765625 
-0.805431744473405597517512433114461600780487060546875]                     
-                                                                           
-                                                                           
-                                                             
- [0.12195360456574192057103450125829479835154212449537040631419147193227177
-07072281 -0.008123130290881946954846439953346604247685795531381076954615265
-216926057964851296; 0.39634232463333060500035154968630411236237809056373749
-67291028820745967835867344 0.3922711469618407507967721492263185395342890073
-81766330685625774594538169690652; 0.623608741422296146622188495992379377326
-1012111860142087916384383100848754432546 0.12364093847437092650170876507509
-88252011078298374602277522448929137058846502853; 0.534163473482693439801594
-9598190797146120758990521065990311201727125884303541186 1.20838467438490251
-984570602012818073090786122054696368793424589674326470922365]
- [-0.8361838634484524302515241377868298585150783921197594796200281898496975
-666674019 -1.86702009280275906714481657557557772254317523145257578870427033
-7325883704383484; 0.1453811433020334592194198867700128021358065155340114402
-40125065565642004128116 -0.821344784297997903320173617608476524831684965801
-178391546925474249475267299101; 1.07777106836562367736866494979442563453648
-6095469728594798970600327565775724293 1.25538770096216352007838104928602742
-9091119897403465064103255124923206814475632; 0.9271450459854138970877764411
-093660000440062290278553621204170193599798676166655 1.537230878645549906894
-162691393353603227149486073413270940164965502830507778154]   
- [-2.4781841695365933879454296869576851158794725492090979510087154475624816
-40308525 -4.473442094117027500962149810242483127063290604571647473071064187
-993636195979255; -0.0800636456970526473426825590296719382059392407749978855
-3243695332637183329478918 -1.2177711307527883897259917368996975453640322015
-70350741827901448233547018592178; 3.296631520487046521606572939309413704811
-029124693202574218616309645150411280569 5.432131611081168714399861849631519
-193841227727803785362948080853293664273521618; 0.37434934542485138684240887
-51458359168829629652339837772895985107618118489826407 0.3128277517221572388
-320863277424571593898950652132176086684904308392850230973752]
- [-2.4975818474654785620583333419028132327401174606322107203958802825370885
-2923473 -4.0447100330112037811789973414846617842896582299344829841646119747
-41954017475663; 2.317330136264620532155919713301594091246140146802376310965
-55742941879474848447 3.3939594174726643759505719833718108393819666973928514
-25070913540376507610733073; 6.272908360633646656799832472605245173020138797
-91124780627884217093459523595315 10.437661931829127942742116637101708750848
-09021359675225845126531385156749683626; -1.68905544826407875647187275626951
-5308655502536388607395692873313231436862205155 -3.1459536741694796133885914
-09304003319814855469322625609339840227466509054260104]       
- [-1.8905635653064639047282991343505179655840798093162889698003912501902176
-05059431 -2.903613161693912334222297344693476087420852212725142231232173351
-309153331868035; 3.63719468066918833601693286989159200951330508996604387659
-1769828411954450994223 5.75968789300718264451102885315708689832163972296572
-6432333575598555749412180328; 6.7848191643649296626210778813473088663956547
-37119855069667803522335464117944441 11.212699088749110772509816303551421403
-75641742621155666612423517643312409626039; -2.44684488609446295706038840307
-4582141844252660843255139959116702928450319605342 -4.3600004123377007720866
-8282413065848764416194625002658163522925887031917076989]
+t: 5-element Array{BigFloat,1}:
+ 0.0
+ 0.174978571039260839955971362922932311969587766184311595600003814987688917
+670033
+ 0.443927592902329549262955543201866942448156891600626374133386916591989198
+2452429
+ 0.764224200877330725867312601549041343518066108894817582022589715719257638
+689101
+ 1.0
+u: 5-element Array{Array{BigFloat,2},1}:
+ [0.647667818307158693613700961577706038951873779296875 0.41891793301301194
+49648873342084698379039764404296875; 0.337399927288797085722649171657394617
+7959442138671875 0.9635281213601436522964149844483472406864166259765625; 0.
+5468425532557132928701548735261894762516021728515625 0.17626705828817867960
+36749365157447755336761474609375; 0.949386810167432759755001825396902859210
+968017578125 0.094873934340720555979942218982614576816558837890625]
+ [-0.6188960718824867315600479934744149366024904665644964231142436361894342
+932688088 0.350025724727944328386746030968719973583575229449002128134621080
+6703142928360151; -0.057412938226884411332353995061985664386953700876801540
+8273367293620859214807343 0.86234921983414702215936734373922280062509104587
+65074257239842556045873829623679; 0.730830422039167856677939018752674284467
+6068724526786605920150319560591324997474 -0.0719500558190700791931994663477
+2401178797807082308463123640778450194963692561123; 1.9219215666761640532952
+4923324445596764154340974752640998224422930766289174934 0.21180652981423132
+55670980185662902931712622332530585206029867133617204212242951]
+ [-4.1997669287267142313732045539404047484114194120399489722683023800035925
+08971228 0.0632909583119936480334383159105773197835051978243704967829547607
+1331680393624141; -1.739226243945377289547481971522409139376310510051609221
+275123959693022486052091 0.355094171967642016298116584668849797403972933138
+5504713998517761256381025786839; 3.7994415851571112213500563836346512582811
+54770211912120721589582030845806947245 -0.240040385360714968142107266138929
+7746469210161750599060258190115042253622508182; 2.1342997898784535892996564
+40491445438293150252246450473226832977722872269962572 0.2778129646905650078
+06693269877821917414661056116102160054686955469100703646363]
+ [-7.5635512949525796987736116184057879839282156909780960499963338551134003
+99481257 -0.359589080931815977341912800027407129310897454992861429003331810
+2208311625259592; 0.1862205157110652691300800139213029913215325082910294572
+287295496316040266450176 -0.26515911468581131538767688062084618206650343063
+10704184720096603820931966510419; 12.05431806309802692414194582081648616481
+42785753061834077106199125537720282214 0.0315536958373547311934658544097954
+3916551258182702592654753178204743926662259857; -1.187865903439273568242938
+436493941128695861300927184146190376350392473205034539 0.150710104446681422
+7984372925104960180497308147302288119152868894315476594225174]
+ [-4.8542206937576882564245579234967520920780649707785056491252596842641804
+60786032 -0.517887020234393120656396709159393988348694698314043201847566049
+4330752288113321; 8.8191934867588965211288403482626033541157741314168154153
+21895369048580961583098 -0.336592778003760157180120554804844891963046986902
+8211880744559125485187905114471; 17.587754503667084597190022349283335243876
+07308932141404430253539110346898271463 0.4741671562762803743232862592247530
+11648517464552072337100017336327754204010767; -6.45922049862757636485396767
+1076753760616070448084440787847954446988697661809018 -0.0841209362735293289
+0565569920493050960722113902499021749143000529257674882024245]
 
@@ -1624,52 +1588,48 @@

Internal Types

 retcode: Success
 Interpolation: Automatic order switching interpolation
-t: 11-element Array{Float64,1}:
- 0.0                
- 0.04373840556447778
- 0.10504494381022488
- 0.1832067917446593 
- 0.27624508173685597
- 0.38220516978577257
- 0.5082351570065224 
- 0.6464984228378687 
- 0.7904627863642966 
- 0.9604154264967177 
- 1.0                
-u: 11-element Array{StaticArrays.SArray{Tuple{4,2},Float64,2,8},1}:
- [0.9556033595934601 0.4445826506822814; 0.6653733603188241 0.3599066578409
-216; 0.08928453186876584 0.9161879858955384; 0.5023138864356134 0.410089319
-6093318]    
- [0.8612814796873004 0.35095022356361616; 0.6884157053916526 0.481918985400
-9987; -0.0435701516313082 0.8681552671858593; 0.7245715179296826 0.60524795
-99696545]   
- [0.639416506953087 0.14149186863102034; 0.6045055288378626 0.5539149485415
-189; -0.17604607024753233 0.8509308437858583; 1.0234926858206546 0.85811132
-14950639]   
- [0.2045828895696477 -0.2525041978120318; 0.3189536789846515 0.498253464653
-9205; -0.21859428329425323 0.9428260910353048; 1.3676916752649069 1.1293421
-70650124]   
- [-0.5247863084275708 -0.8853558155271741; -0.22904535724602598 0.272081830
-017429; -0.022586423462697486 1.2658051861544248; 1.6930321068954122 1.3473
-66838750421]
- [-1.596241487638124 -1.7650129829900383; -1.0096364160682132 -0.0777405483
-9070577; 0.6111815116390642 1.9710492033139315; 1.9013867799889466 1.410428
-616184992]  
- [-3.088864730689933 -2.8884867482243854; -1.89939215748847 -0.377417741616
-9476; 2.0255573851318265 3.3106758294172733; 1.8401389914264719 1.159055788
-0944177]    
- [-4.741278898243673 -3.9335065059007217; -2.3837684701411317 -0.1628264011
-8413036; 4.420117802509115 5.328489736198788; 1.271812824420278 0.396970463
-19250806]   
- [-6.0300291310205925 -4.367029492312431; -1.74274192279828 1.1540427220849
-248; 7.657029927596874 7.728063705591205; 0.00947891820170188 -0.9832882854
-497728]     
- [-6.137700521949925 -3.2666820278834194; 1.3340496794841403 4.697017393957
-745; 11.717909327425811 10.089825057925813; -2.4251766777177335 -3.31580501
-33186405]   
- [-5.826048266206638 -2.666854071203864; 2.487015014508281 5.86393368970059
-7; 12.557283203988641 10.417972995877923; -3.129665835379061 -3.94069849695
-08274]
+t: 10-element Array{Float64,1}:
+ 0.0
+ 0.044268383288701384
+ 0.112594141115787
+ 0.18849010870990623
+ 0.2848505016507512
+ 0.4019790700207936
+ 0.5407550483819644
+ 0.6894509765240777
+ 0.8445730185805572
+ 1.0
+u: 10-element Array{StaticArrays.SArray{Tuple{4,2},Float64,2,8},1}:
+ [0.24033312390823647 0.8979401730035852; 0.46674384786229717 0.72621673279
+51474; 0.6104238201344643 0.3564577178285062; 0.9933518244309794 0.90221948
+93683779]
+ [0.004891504631234167 0.7027669540137237; 0.4147689965386876 0.71967685855
+92731; 0.6361562875932304 0.25986913047222704; 1.1814558531925952 1.1814686
+208833447]
+ [-0.4570244736237513 0.264050800328172; 0.23273686958692968 0.545386869904
+514; 0.7847439780439889 0.21852350075142657; 1.425727970417176 1.5773611564
+460381]
+ [-1.0948377870594164 -0.4114194170312348; -0.07478740208120283 0.153324394
+74780513; 1.1332151743269427 0.37028301689515775; 1.6127509706668235 1.9444
+745564676607]
+ [-2.0481704597424226 -1.5222571419277677; -0.5285242778822297 -0.549821128
+9609227; 1.8954182650067346 0.9386246285108104; 1.6863087081882662 2.255157
+0527888907]
+ [-3.3028943639184885 -3.151523554454985; -0.9627583143880756 -1.4833533435
+024806; 3.336483768095359 2.2961545121423343; 1.466931077543047 2.315648359
+1747077]
+ [-4.6378194222266504 -5.200697805959124; -0.8911555816171014 -2.2062830447
+743305; 5.7130589428286775 4.9113682246370605; 0.6779574942196687 1.7994681
+0124736]
+ [-5.366478203424986 -6.9869154537664855; 0.4860214587912063 -1.74242477710
+86843; 8.734535354674204 8.748840064233864; -0.8784957112072949 0.382019905
+12031037]
+ [-4.606328876422249 -7.522771131283662; 3.9540001108450564 1.0291461918840
+121; 11.618323762719408 13.224470966242185; -3.258974462675836 -2.142263438
+2850085]
+ [-1.4659632576115578 -5.610718738601163; 9.788349464540074 6.8738327944165
+49; 12.919692049714163 16.869256407991536; -6.186179892711854 -5.6455665591
+70115]
 
@@ -1682,10 +1642,10 @@

Internal Types

 4×2 StaticArrays.SArray{Tuple{4,2},Float64,2,8} with indices SOneTo(4)×SOne
 To(2):
-  0.639417  0.141492
-  0.604506  0.553915
- -0.176046  0.850931
-  1.02349   0.858111
+ -0.457024  0.264051
+  0.232737  0.545387
+  0.784744  0.218524
+  1.42573   1.57736
 
@@ -1702,36 +1662,82 @@

Conclusion

Computer Information:

-
Julia Version 1.3.0
-Commit 46ce4d7933 (2019-11-26 06:09 UTC)
+
Julia Version 1.4.2
+Commit 44fa15b150* (2020-05-23 18:35 UTC)
 Platform Info:
-  OS: Windows (x86_64-w64-mingw32)
-  CPU: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
+  OS: Linux (x86_64-pc-linux-gnu)
+  CPU: Intel(R) Xeon(R) CPU @ 2.30GHz
   WORD_SIZE: 64
   LIBM: libopenlibm
-  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
+  LLVM: libLLVM-8.0.1 (ORCJIT, haswell)
 Environment:
-  JULIA_EDITOR = "C:\Users\accou\AppData\Local\atom\app-1.42.0\atom.exe"  -a
+  JULIA_CUDA_MEMORY_LIMIT = 536870912
+  JULIA_DEPOT_PATH = /builds/JuliaGPU/DiffEqTutorials.jl/.julia
+  JULIA_PROJECT = @.
   JULIA_NUM_THREADS = 4
 

Package Information:

-
Status `~\.julia\dev\DiffEqTutorials\Project.toml`
+
Status `/builds/JuliaGPU/DiffEqTutorials.jl/Project.toml`
+[2169fc97-5a83-5252-b627-83903c6c433c] AlgebraicMultigrid 0.3.0
+[7e558dbc-694d-5a72-987c-6f4ebed21442] ArbNumerics 1.0.5
+[6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf] BenchmarkTools 0.5.0
+[be33ccc6-a3ff-5ff2-a52e-74243cff1e17] CUDAnative 3.1.0
+[159f3aea-2a34-519c-b102-8c37f9878175] Cairo 1.0.3
+[3a865a2d-5b23-5a0f-bc46-62713ec82fae] CuArrays 2.2.1
+[55939f99-70c6-5e9b-8bb0-5071ed7d61fd] DecFP 0.4.10
+[abce61dc-4473-55a0-ba07-351d65e31d42] Decimals 0.4.1
+[ebbdde9d-f333-5424-9be2-dbf1e9acfb5e] DiffEqBayes 2.15.0
+[eb300fae-53e8-50a0-950c-e21f52c2b7e0] DiffEqBiological 4.3.0
+[459566f4-90b8-5000-8ac3-15dfb0a30def] DiffEqCallbacks 2.13.3
+[f3b72e0c-5b89-59e1-b016-84e28bfd966d] DiffEqDevTools 2.21.0
+[77a26b50-5914-5dd7-bc55-306e6241c503] DiffEqNoiseProcess 4.2.0
+[9fdde737-9c7f-55bf-ade8-46b3f136cc48] DiffEqOperators 4.10.0
+[1130ab10-4a5a-5621-a13d-e4788d82bd4c] DiffEqParamEstim 1.14.1
+[055956cb-9e8b-5191-98cc-73ae4a59e68a] DiffEqPhysics 3.2.0
+[0c46a032-eb83-5123-abaf-570d42b7fbaa] DifferentialEquations 6.14.0
+[31c24e10-a181-5473-b8eb-7969acd0382f] Distributions 0.23.4
+[497a8b3b-efae-58df-a0af-a86822472b78] DoubleFloats 1.1.12
+[587475ba-b771-5e3f-ad9e-33799f191a9c] Flux 0.10.4
+[f6369f11-7733-5829-9624-2563aa707210] ForwardDiff 0.10.10
+[7073ff75-c697-5162-941a-fcdaad2a7d2a] IJulia 1.21.2
+[23fbe1c1-3f47-55db-b15f-69d7ec21a316] Latexify 0.13.5
+[c7f686f2-ff18-58e9-bc7b-31028e88f75d] MCMCChains 3.0.12
+[eff96d63-e80a-5855-80a2-b1b0885c5ab7] Measurements 2.2.1
+[961ee093-0014-501f-94e3-6117800e7a78] ModelingToolkit 3.1.1
+[2774e3e8-f4cf-5e23-947b-6d7e65073b56] NLsolve 4.4.0
+[8faf48c0-8b73-11e9-0e63-2155955bfa4d] NeuralNetDiffEq 1.5.0
+[429524aa-4258-5aef-a3af-852621145aeb] Optim 0.21.0
+[1dea7af3-3e70-54e6-95c3-0bf5283fa5ed] OrdinaryDiffEq 5.41.0
+[65888b18-ceab-5e60-b2b9-181511a3b968] ParameterizedFunctions 5.3.0
+[91a5bcdd-55d7-5caf-9e0b-520d859cae80] Plots 1.4.0
+[d330b81b-6aea-500a-939a-2ce795aea3ee] PyPlot 2.9.0
+[731186ca-8d62-57ce-b412-fbd966d074cd] RecursiveArrayTools 2.4.4
+[47a9eef4-7e08-11e9-0b38-333d64bd3804] SparseDiffTools 1.8.0
+[684fba80-ace3-11e9-3d08-3bc7ed6f96df] SparsityDetection 0.3.2
+[90137ffa-7385-5640-81b9-e52037218182] StaticArrays 0.12.3
+[f3b207a7-027a-5e70-b257-86293d7955fd] StatsPlots 0.14.6
+[789caeaf-c7a9-5a7d-9973-96adeb23e2a0] StochasticDiffEq 6.23.1
+[c3572dad-4567-51f8-b174-8c6c989267f4] Sundials 4.2.3
+[1986cc42-f94f-5a68-af5c-568840ba703d] Unitful 1.2.1
+[44d3d7a6-8a23-5bf8-98c5-b353f8df5ec9] Weave 0.10.2
+[b77e0a4c-d291-57a0-90e8-8db25a27a240] InteractiveUtils
+[37e2e46d-f89d-539d-b4ee-838fcccc9c8e] LinearAlgebra
+[44cfe95a-1eb2-52ea-b672-e2afdf69b78f] Pkg
- -
- - - +
+
- +
+ + diff --git a/markdown/introduction/01-ode_introduction.md b/markdown/introduction/01-ode_introduction.md index 113e1547..4ff65eff 100644 --- a/markdown/introduction/01-ode_introduction.md +++ b/markdown/introduction/01-ode_introduction.md @@ -1,3 +1,9 @@ +--- +author: "Chris Rackauckas" +title: "An Intro to DifferentialEquations.jl" +--- + + ## Basic Introduction Via Ordinary Differential Equations This notebook will get you started with DifferentialEquations.jl by introducing you to the functionality for solving ordinary differential equations (ODEs). The corresponding documentation page is the [ODE tutorial](https://docs.juliadiffeq.org/dev/tutorials/ode_example/). While some of the syntax may be different for other types of equations, the same general principles hold in each case. Our goal is to give a gentle and thorough introduction that highlights these principles in a way that will help you generalize what you have learned. @@ -71,17 +77,17 @@ sol = solve(prob) retcode: Success Interpolation: Automatic order switching interpolation t: 5-element Array{Float64,1}: - 0.0 + 0.0 0.10042494449239292 0.35218603951893646 - 0.6934436028208104 - 1.0 + 0.6934436028208104 + 1.0 u: 5-element Array{Float64,1}: - 1.0 + 1.0 1.1034222047865465 1.4121908848175448 - 1.9730384275623003 - 2.664456142481452 + 1.9730384275622996 + 2.664456142481451 ```` @@ -136,10 +142,10 @@ sol.t ```` 5-element Array{Float64,1}: - 0.0 + 0.0 0.10042494449239292 0.35218603951893646 - 0.6934436028208104 + 0.6934436028208104 1.0 ```` @@ -156,11 +162,11 @@ sol.u ```` 5-element Array{Float64,1}: - 1.0 + 1.0 1.1034222047865465 1.4121908848175448 - 1.9730384275623003 - 2.664456142481452 + 1.9730384275622996 + 2.664456142481451 ```` @@ -176,11 +182,11 @@ sol.u ```` 5-element Array{Float64,1}: - 1.0 + 1.0 1.2038471492789395 1.7643769243364813 - 2.6664820303831105 - 3.664456142481452 + 2.66648203038311 + 3.664456142481451 ```` @@ -198,17 +204,17 @@ sol retcode: Success Interpolation: Automatic order switching interpolation t: 5-element Array{Float64,1}: - 0.0 + 0.0 0.10042494449239292 0.35218603951893646 - 0.6934436028208104 - 1.0 + 0.6934436028208104 + 1.0 u: 5-element Array{Float64,1}: - 1.0 + 1.0 1.1034222047865465 1.4121908848175448 - 1.9730384275623003 - 2.664456142481452 + 1.9730384275622996 + 2.664456142481451 ```` @@ -223,7 +229,7 @@ sol(0.45) ```` -1.5542610480553116 +1.554261048055312 ```` @@ -245,24 +251,24 @@ sol = solve(prob,abstol=1e-8,reltol=1e-8) retcode: Success Interpolation: Automatic order switching interpolation t: 9-element Array{Float64,1}: - 0.0 + 0.0 0.04127492324135852 0.14679917846877366 0.28631546412766684 - 0.4381941361169628 - 0.6118924302028597 - 0.7985659100883337 - 0.9993516479536952 - 1.0 + 0.4381941361169628 + 0.6118924302028597 + 0.7985659100883337 + 0.9993516479536952 + 1.0 u: 9-element Array{Float64,1}: - 1.0 + 1.0 1.0412786454705882 1.1547261252949712 1.3239095703537043 1.5363819257509728 1.8214895157178692 2.1871396448296223 - 2.662763824115295 + 2.662763824115295 2.664456241933517 ```` @@ -308,17 +314,17 @@ t: 11-element Array{Float64,1}: 0.9 1.0 u: 11-element Array{Float64,1}: - 1.0 - 1.1029627851292922 + 1.0 + 1.102962785129292 1.2165269512238264 - 1.341783821227542 + 1.341783821227542 1.4799379510586077 - 1.6323162070541606 - 1.8003833264983586 - 1.9857565541588764 - 2.1902158127997704 - 2.4157257420844966 - 2.664456142481452 + 1.632316207054161 + 1.8003833264983584 + 1.9857565541588758 + 2.1902158127997695 + 2.415725742084496 + 2.664456142481451 ```` @@ -341,8 +347,8 @@ t: 3-element Array{Float64,1}: 0.9 u: 3-element Array{Float64,1}: 1.2165269512238264 - 1.9857565541588764 - 2.4157257420844966 + 1.9857565541588758 + 2.415725742084496 ```` @@ -360,17 +366,17 @@ sol = solve(prob,dense=false) retcode: Success Interpolation: 1st order linear t: 5-element Array{Float64,1}: - 0.0 + 0.0 0.10042494449239292 0.35218603951893646 - 0.6934436028208104 - 1.0 + 0.6934436028208104 + 1.0 u: 5-element Array{Float64,1}: - 1.0 + 1.0 1.1034222047865465 1.4121908848175448 - 1.9730384275623003 - 2.664456142481452 + 1.9730384275622996 + 2.664456142481451 ```` @@ -391,8 +397,8 @@ t: 2-element Array{Float64,1}: 0.0 1.0 u: 2-element Array{Float64,1}: - 1.0 - 2.664456142481452 + 1.0 + 2.664456142481451 ```` @@ -412,7 +418,7 @@ Interpolation: 1st order linear t: 1-element Array{Float64,1}: 1.0 u: 1-element Array{Float64,1}: - 2.664456142481452 + 2.664456142481451 ```` @@ -438,23 +444,23 @@ sol = solve(prob,alg_hints=[:stiff]) retcode: Success Interpolation: specialized 3rd order "free" stiffness-aware interpolation t: 8-element Array{Float64,1}: - 0.0 + 0.0 0.05653299582822294 0.17270731152826024 - 0.3164602871490142 - 0.5057500163821153 - 0.7292241858994543 - 0.9912975001018789 - 1.0 + 0.3164602871490142 + 0.5057500163821153 + 0.7292241858994543 + 0.9912975001018789 + 1.0 u: 8-element Array{Float64,1}: - 1.0 + 1.0 1.0569657840332976 1.1844199383303913 1.3636037723365293 1.6415399686182572 - 2.043449143475479 - 2.6418256160577602 - 2.6644526430553808 + 2.0434491434754793 + 2.641825616057761 + 2.6644526430553817 ```` @@ -474,27 +480,27 @@ sol = solve(prob,Tsit5(),reltol=1e-6) retcode: Success Interpolation: specialized 4th order "free" interpolation t: 10-element Array{Float64,1}: - 0.0 + 0.0 0.028970819746309166 - 0.10049147151547619 - 0.19458908698515082 - 0.3071725081673423 - 0.43945421453622546 - 0.5883434923759523 - 0.7524873357619015 - 0.9293021330536031 - 1.0 + 0.10049147151547619 + 0.19458908698515082 + 0.3071725081673423 + 0.43945421453622546 + 0.5883434923759523 + 0.7524873357619015 + 0.9293021330536031 + 1.0 u: 10-element Array{Float64,1}: - 1.0 + 1.0 1.0287982807225062 1.1034941463604806 1.2100931078233779 - 1.351248605624241 - 1.538280340326815 + 1.351248605624241 + 1.538280340326815 1.7799346012651116 - 2.0905717422346277 - 2.4861021714470244 - 2.6644562434913373 + 2.090571742234628 + 2.486102171447025 + 2.6644562434913377 ```` @@ -595,46 +601,46 @@ sol = solve(prob) retcode: Success Interpolation: Automatic order switching interpolation t: 1294-element Array{Float64,1}: - 0.0 + 0.0 3.5678604836301404e-5 0.0003924646531993154 0.0032624077544510573 - 0.009058075635317072 - 0.01695646895607931 - 0.0276899566248403 - 0.041856345938267966 - 0.06024040228733675 - 0.08368539694547242 - ⋮ - 99.39403070915297 - 99.47001147494375 - 99.54379656909015 - 99.614651558349 - 99.69093823148101 - 99.78733023233721 - 99.86114450046736 - 99.96115759510786 - 100.0 + 0.009058075635317072 + 0.01695646895607931 + 0.0276899566248403 + 0.041856345938267966 + 0.06024040228733675 + 0.08368539694547242 + ⋮ + 99.39403070915297 + 99.47001147494375 + 99.54379656909015 + 99.614651558349 + 99.69093823148101 + 99.78733023233721 + 99.86114450046736 + 99.96115759510786 + 100.0 u: 1294-element Array{Array{Float64,1},1}: - [1.0, 0.0, 0.0] + [1.0, 0.0, 0.0] [0.9996434557625105, 0.0009988049817849058, 1.781434788799208e-8] - [0.9961045497425811, 0.010965399721242457, 2.146955365838907e-6] - [0.9693591634199452, 0.08977060667778931, 0.0001438018342266937] - [0.9242043615038835, 0.24228912482984957, 0.0010461623302512404] - [0.8800455868998046, 0.43873645009348244, 0.0034242593451028745] - [0.8483309877783048, 0.69156288756671, 0.008487623500490047] - [0.8495036595681027, 1.0145425335433382, 0.01821208597613427] - [0.9139069079152129, 1.4425597546855036, 0.03669381053327124] - [1.0888636764765296, 2.052326153029042, 0.07402570506414284] - ⋮ - [12.999157033749652, 14.10699925404482, 31.74244844521858] - [11.646131422021162, 7.2855792145502845, 35.365000488215486] - [7.777555445486692, 2.5166095828739574, 32.030953593541675] - [4.739741627223412, 1.5919220588229062, 27.249779003951755] - [3.2351668945618774, 2.3121727966182695, 22.724936101772805] - [3.310411964698304, 4.28106626744641, 18.435441144016366] - [4.527117863517627, 6.895878639772805, 16.58544600757436] - [8.043672261487556, 12.711555298531689, 18.12537420595938] + [0.9961045497425811, 0.010965399721242457, 2.146955365838907e-6] + [0.9693591634199452, 0.08977060667778931, 0.0001438018342266937] + [0.9242043615038835, 0.24228912482984957, 0.0010461623302512404] + [0.8800455868998046, 0.43873645009348244, 0.0034242593451028745] + [0.8483309877783048, 0.69156288756671, 0.008487623500490047] + [0.8495036595681027, 1.0145425335433382, 0.01821208597613427] + [0.9139069079152129, 1.4425597546855036, 0.03669381053327124] + [1.0888636764765296, 2.052326153029042, 0.07402570506414284] + ⋮ + [12.999157033749652, 14.10699925404482, 31.74244844521858] + [11.646131422021162, 7.2855792145502845, 35.365000488215486] + [7.777555445486692, 2.5166095828739574, 32.030953593541675] + [4.739741627223412, 1.5919220588229062, 27.249779003951755] + [3.2351668945618774, 2.3121727966182695, 22.724936101772805] + [3.310411964698304, 4.28106626744641, 18.435441144016366] + [4.527117863517627, 6.895878639772805, 16.58544600757436] + [8.043672261487556, 12.711555298531689, 18.12537420595938] [9.97537965430362, 15.143884806010783, 21.00643286956427] ```` @@ -685,7 +691,7 @@ A = Array(sol) ```` 3×1294 Array{Float64,2}: 1.0 0.999643 0.996105 0.969359 … 4.52712 8.04367 9.97538 - 0.0 0.000998805 0.0109654 0.0897706 6.89588 12.7116 15.1439 + 0.0 0.000998805 0.0109654 0.0897706 6.89588 12.7116 15.1439 0.0 1.78143e-8 2.14696e-6 0.000143802 16.5854 18.1254 21.0064 ```` @@ -760,47 +766,47 @@ sol = solve(prob) retcode: Success Interpolation: Automatic order switching interpolation t: 10-element Array{Float64,1}: - 0.0 - 0.04841602236644631 - 0.12841436984565474 - 0.21949854815526873 - 0.3286354523115623 - 0.45363089733018575 - 0.5884696836694016 - 0.717622136733705 - 0.8905885900507794 - 1.0 + 0.0 + 0.04018510695223035 + 0.11203472865898827 + 0.19549824155043496 + 0.29790008667570517 + 0.4228354632291847 + 0.5687866645125571 + 0.729379105150639 + 0.9002384713134701 + 1.0 u: 10-element Array{Array{Float64,2},1}: - [0.815796610273396 0.3545669953455124; 0.4267258979958011 0.96717269152610 -36; 0.7372938700681682 0.5956927989343674; 0.11307704703071297 0.5421638672 -32089] - [0.7982516219133012 0.22247112299856342; 0.6265883479028581 0.954691017339 -085; 0.5914099176816812 0.5684827098999932; 0.3562759911599949 0.6631347835 -45533] - [0.6356696207300371 -0.0699302148681995; 0.7697844516711172 0.841288679626 -7256; 0.40170368675372103 0.601560360496467; 0.74488658768305 0.82313885049 -45347] - [0.24550896421170043 -0.49746826290108265; 0.6689314152817034 0.6127000948 -258978; 0.3210023164355822 0.7827470326290281; 1.1410050499197564 0.9286284 -03914769] - [-0.4934606559541962 -1.095635211018943; 0.25118935900975836 0.29153200894 -323766; 0.5105991446378327 1.2306136014319375; 1.5016594168676047 0.9202440 -087549442] - [-1.634366624658973 -1.7940823881816685; -0.44321650040428384 0.0297190129 -9240043; 1.2339131101088978 2.0587100077032434; 1.6840174430711865 0.693580 -4508152102] - [-3.0480311116087115 -2.3825820922429375; -1.11438993032307 0.122475324965 -65858; 2.713300622574013 3.2585413126275444; 1.5008487473767809 0.154619794 -2334656] - [-4.315674439761319 -2.56010175573077; -1.2664137454639106 0.8176908537029 -307; 4.783920249052397 4.5274176666857935; 0.8621017015588281 -0.6570117608 -688686] - [-5.2551724564900235 -1.7760576760312996; 0.033198786240424605 2.974658736 -900867; 8.187045156049942 5.873036379501265; -0.8050964994094623 -2.1324714 -860548752] - [-4.979066381210218 -0.4478110029627467; 2.1075802094039346 5.105843203753 -425; 10.289435170877807 6.094978361813493; -2.3379487634840435 -3.199628982 -155013] + [0.7637548238660845 0.015803866809346978; 0.3474524613246084 0.37343280589 +831185; 0.5249741961172385 0.5965552620587542; 0.6351532866089222 0.0636681 +1036365938] + [0.6402175098666107 0.0006037801944166459; 0.41601993251156627 0.429164140 +30415967; 0.4418074384826368 0.5982663265278898; 0.8757665695906751 0.09041 +848621022988] + [0.2862594757753755 -0.04020129399261979; 0.37623997379820256 0.5061412983 +900834; 0.38224751510469845 0.6114691667062325; 1.2785601486874816 0.126695 +7048707651] + [-0.333936569561097 -0.10405481326601594; 0.10151992274017108 0.5671500340 +430028; 0.5080872193917743 0.6467545787533748; 1.6760665824784855 0.1465985 +5007833558] + [-1.3705873843789984 -0.1926258390944256; -0.4733912111137165 0.6198228110 +796913; 1.0380809960525847 0.7221276332374202; 2.0078384004987537 0.1325966 +1414373825] + [-2.9368209648091046 -0.28410534810870725; -1.2819041969257159 0.691741337 +731596; 2.3641153311508862 0.855133804001645; 2.0839418186986336 0.05157366 +857847365] + [-4.884070261324253 -0.3045315821676079; -1.8438324175551326 0.85566752670 +63094; 4.926651770014615 1.0285480661180786; 1.562457201740442 -0.133292817 +8720064] + [-6.532010306175154 -0.12157235068007999; -1.1066229366117604 1.2141676174 +186506; 8.787568370885724 1.1355810046432984; 0.05248097613732483 -0.429429 +00111682425] + [-6.6353434696133835 0.41836916987764117; 2.3167982303665955 1.82938329738 +57505; 13.20978405135482 0.9528893310533812; -2.717831553464249 -0.78796784 +45840644] + [-5.374418625048119 0.9249705080340971; 5.909527417590797 2.26648785453837 +04; 15.271296611398837 0.6014601259756733; -4.83088087362685 -0.97271848081 +71725] ```` @@ -816,10 +822,10 @@ sol[3] ```` 4×2 Array{Float64,2}: - 0.63567 -0.0699302 - 0.769784 0.841289 - 0.401704 0.60156 - 0.744887 0.823139 + 0.286259 -0.0402013 + 0.37624 0.506141 + 0.382248 0.611469 + 1.27856 0.126696 ```` @@ -835,10 +841,10 @@ big_u0 = big.(u0) ```` 4×2 Array{BigFloat,2}: - 0.815797 0.354567 - 0.426726 0.967173 - 0.737294 0.595693 - 0.113077 0.542164 + 0.763755 0.0158039 + 0.347452 0.373433 + 0.524974 0.596555 + 0.635153 0.0636681 ```` @@ -857,67 +863,64 @@ sol = solve(prob) retcode: Success Interpolation: Automatic order switching interpolation t: 6-element Array{Float64,1}: - 0.0 - 0.06045369748327955 - 0.27340205261345235 - 0.5673380394454617 - 0.8768404355382271 - 1.0 + 0.0 + 0.11066848054444339 + 0.34969130745307003 + 0.6507768497178879 + 0.971271619312092 + 1.0 u: 6-element Array{Array{BigFloat,2},1}: - [0.81579661027339600565255750552751123905181884765625 0.354566995345512392 -390219247317872941493988037109375; 0.42672589799580107339238566055428236722 -9461669921875 0.9671726915261036339188649435527622699737548828125; 0.737293 -8700681681556403646027320064604282379150390625 0.59569279893436744011125938 -41389752924442291259765625; 0.113077047030712973807453636254649609327316284 -1796875 0.5421638672320889806854893322451971471309661865234375] - - - - [0.78453389874846221553898335297811719141303603004981581706144464707825965 -61517591 0.1841749122174734180241275479000261509497673090472138310534341926 -311468789467257; 0.66289317810761029049487789214463061749720289709590151908 -45177233998175043537675 0.9444993386789167249801366675163326962012750949260 -582747200538849669245108075166; 0.55793828025090878222453612694682815867414 -61681071456774240397081876119879033652 0.5668332492220226795504899048145930 -519547314271210827451259106082885998826755636; 0.41617606457727363023482486 -31760962171710002822562196060823948248819152461176165 0.6906256051268396980 -888300031156988821968575668427301615023624170649120553585027] - [-0.0846775097251102490215945734514424983135383115152048514415067727032320 -6945534579 -0.7852325199444285523384769766280161716708042917964239993569081 -78799827062017212; 0.496130049309447339918811571278818096585779437286381683 -3489406005459553280927505 0.45325439581016648378211265332080028219163727635 -68128176029943519868466353976442; 0.369356234395109586302510902031643892800 -053092689477833356653491630320274407486 0.971330923520600407789640481087406 -3769105022292776695526018883337531568230656202; 1.3381877231392475513574538 -67187173753850073806010790721514266640156788723132819 0.9446542402378955135 -193476780711685838892016498853817621130203359001492331365822] - [-2.8241813672739062052389815803089568071499473863983306118006207255559859 -89464914 -2.310996071903638597027703842205896752066037337118207438409392337 -843017297399427; -1.0318783969991041346093522398653294127948891392330533496 -9374588650243859238759 0.07130296797066886352178318621967223900932563271262 -166328116249592655632542726982; 2.43275289347621211235514628123461612126340 -2766246593002636537407914880892749721 3.05571370678162579858772963877386998 -8519412172668191736862991565971065467966149; 1.5599244746510185125008915351 -84119060285338170964566367823817403623361804486123 0.2600973398008936633816 -279656602241628024537594658014574534542783947860589812622] - [-5.2326311290892955506248935756792903565141615842641474722135039612371034 -78309721 -1.892946987985841812288179118782116730410850519171202679245195628 -523040833054454; -0.1523480672761063451549827615993995121245504913287306312 -969586214536440975871661 2.747965303818258576746976361604343958856338049609 -278304862923300999851756972517; 7.90855012010486824089912758278313485427752 -1662013064777338678839962611794638316 5.80053824479758964576528788986099173 -9171698324319216259653383823817131795958317; -0.637795818656921713530613737 -6078148917645669590214302110451275144383269341200675 -2.0028936957520679404 -77145676753186727773855373641133956511610022527441255402704] - [-4.9790679285952016378395847231417721438369095769478853841145120442551566 -63021545 -0.447802280501505450389481043189337484651582666328072672139801900 -2489561879848852; 2.1075987426257136029395053914747849296483434819794208828 -29858647730237880033385 5.1058625591508303548174482296915080606218190766208 -25548663895664438708707017582; 10.28945688427075079299505940692616668301575 -201331579571755989755070525734745872 6.094983889033111664924227182886231598 -311701562453572216085154309795489378156499; -2.3379601823905082048378497613 -79796740077996262451394343837415668057307422128537 -3.199638426555815837054 -60485718405994613833573923009201594447063802470051293152] + [0.7637548238660845090208795227226801216602325439453125 0.0158038668093469 +7807288102922029793262481689453125; 0.3474524613246083859507962188217788934 +7076416015625 0.37343280589831184812510400661267340183258056640625; 0.52497 +41961172385007472485085600055754184722900390625 0.5965552620587541987617896 +66605181992053985595703125; 0.635153286608922229561358108185231685638427734 +375 0.0636681103636593803685173043049871921539306640625] + [0.29457217844753972330140792065331594335045078250348221084840344006681996 +36013995 -0.039283332922574536292861102069405979455975852780635151012477307 +91313533154599686; 0.378821620917826329630878685949135228948918468625509283 +9985488125281907251352488 0.50491744373914835297948695844662139060070202938 +21290574153081912499904303620086; 0.382092777861873759716395691605006861620 +2623255318835747173844714976113493555808 0.61107924689751476454293377498209 +62238679820450917009856990346872227630909770667; 1.271337872187865771412738 +984550766760302951988345904091214481277974975569039645 0.126160049694481879 +734966175540987662335114857270324644603094015379590786959125] + [-1.9892926282818621900197912256130028748773076217535806825860776340085075 +7369819 -0.2351111207844671210211505224171749474368397131790208752209810956 +846134655607402; -0.8133712259133945584805087295674760513317379625985085575 +115213292710851175471148 0.645802717579950494643509518655425191537427126224 +3825181914192099180845988940512; 1.4915723320317631671842021633356929151593 +64968638731771257016633304947406788783 0.7727846435558810491034147158424620 +989153631309331168539731719540580874912342454; 2.08952603477208884626517129 +3161910351816051512848895274730321996406852790161419 0.10779206885146547658 +06990618400927263515616631804273476625316639950905334914731] + [-5.8436678475230153350057197994238684200662924413580915017424480179935398 +56803902 -0.244621598701266575261780725884407600658135059943225268057142727 +0232645890027573; -1.707192889125725729748231339406664265479135727660948471 +152989385581618194225677 1.011739730724958513208038280166042812406417717434 +136780577270347345730775765552; 6.79451521497870498424179888848328465440692 +560048245549399469326702090439283259 1.103749039986005461291303388277713990 +344595504132308186701372766824886185862815; 0.92290019864425632829091723206 +96043072999834114360721198367816014686019517105582 -0.274841299713644495789 +3351213289128247736164627121582177047190927484441042263108] + [-5.8605010633542192002610608231047198895904290914052445384610152336878782 +6628228 0.76447118867664096396705092409965622742549855429590243177660179070 +98462275396826; 4.747241385252438316383061628863536296997881452742151793823 +443462735151882621724 2.137859881705940420934978430112733223191928575611197 +235184582675582087470871472; 14.7543422896124773182365625932780330909063019 +8563755140357872728085152415882592 0.72566897389483529103747384956695807792 +81212601662062972286121331628784140912331; -4.19139067862137130664772459540 +5946501433321045338783885186878924171298648796172 -0.9238562474921242976030 +09595745951179317391997216675117854015535477431442433709] + [-5.3744128793052812184455230021782629546357551704322158854726675104467278 +66417488 0.9249765388304762539468854311212646297128596498894704290365151779 +679263913522488; 5.90957132286666258627380774829416831594863651897120967107 +0572522504336108686603 2.26649528024961185300600861691960893234475462925129 +7955652763649051904326019956; 15.271333102751646217641437324766575399053905 +72456413350361989120100755939894328 0.6014570411302269580019589290883742856 +703714351035806483402069177125374063041795; -4.8309053298570960090548614911 +05422454888996112667949054566435446231737319341218 -0.972721147184919753984 +0645381251440841349220377394155925147718825670339577242146] ```` @@ -928,8 +931,8 @@ sol[1,3] ```` --0.084677509725110249021594573451442498313538311515204851441506772703232069 -45534579 +-1.989292628281862190019791225613002874877307621753580682586077634008507573 +69819 ```` @@ -948,73 +951,68 @@ sol = solve(prob) retcode: Success Interpolation: Automatic order switching interpolation t: 6-element Array{BigFloat,1}: - 0.0 - - 0.060453697483279549515813279712810712424266474860592303264226255412244400 -07007405 - 0.273402052613452341453010149914879461747934153856765188346236511356383092 -9721304 - 0.567338039445461579355857095764525119958745780825868581004452504045682965 -6861064 - 0.876840435538226928445764018292903152398656739455686996795825674545911093 -5040272 - 1.0 - + 0.0 + 0.110668480544443385144722681623580989434451154580994219717861493916260649 +8027799 + 0.349691307453069995032215488856673647275777284160775862405509510342263101 +4312538 + 0.650776849717887776346263402349261397623796534801642043607649870053772486 +2142495 + 0.971271619312091948957930567740879115714675683770279575094010499569202415 +9077896 + 1.0 u: 6-element Array{Array{BigFloat,2},1}: - [0.81579661027339600565255750552751123905181884765625 0.354566995345512392 -390219247317872941493988037109375; 0.42672589799580107339238566055428236722 -9461669921875 0.9671726915261036339188649435527622699737548828125; 0.737293 -8700681681556403646027320064604282379150390625 0.59569279893436744011125938 -41389752924442291259765625; 0.113077047030712973807453636254649609327316284 -1796875 0.5421638672320889806854893322451971471309661865234375] - - - - [0.78453389874846221488012813627899349705194027142182293639557139524773841 -19760084 0.1841749122174734163627145399135445035116620675061252727225516104 -907176956141425; 0.66289317810761029191570074371895024799124307539108499015 -42563886103111865522497 0.9444993386789167244938307777049449450868877912511 -47837845386765960328698824054; 0.557938280250908780841127184039081944416435 -0235096653844893295198402603628729691 0.56683324922202267952707322890967866 -03170943929746262976935869700262615476846257; 0.416176064577273632756350242 -6336902150897515310938304046681226325474143380512241 0.69062560512683969922 -59761260987142662474028883074650402994297572003474349851551] - [-0.0846775097251102313966966587556028353570103311123795789512867236216042 -2328982887 -0.7852325199444285380096227618831977773878942499632069115632664 -278814205737348195; 0.49613004930944734998062934000171636884620609801520508 -3726140460710928627355574 0.45325439581016649157558351156060397900369799198 -34105134776941526161094934537715; 0.369356234395109581940523516094936942536 -1151877849918004099630227436406875784989 0.97133092352060039716211890057306 -87907685867685366142095718790909088753849422992; 1.338187723139247542675534 -540998782479478912437469202962207115175693044127715264 0.944654240237895513 -6651380518969051114538188284206022945382533235641678416325072] - [-2.8241813672739057597314552705338300010168836593828443851901541155812251 -47546352 -2.310996071903638445580755813611681745460210337645353868735673316 -190890748487608; -1.0318783969991039592491676670567250038413868547098594239 -36884244081174966882921 0.0713029679706687773048801055572617883177887197288 -8991755295488333120091106649332; 2.4327528934762115732135510611748400375523 -91605235430529475713669108592373126095 3.0557137067816254000355716144182102 -18818067437947698948604592188864739194372311; 1.559924474651018617835807921 -535147809849178216332401461119121225191597196399308 0.260097339800893864914 -9029786988559491170338942197944734429738037344507983764936] - [-5.2326311290892953212132571644994826410856173075305687637833137112173867 -42618145 -1.892946987985842723976051912437666859618380865789935787573044098 -824453906302059; -0.1523480672761077956973888944822588569039874711281577028 -028863110683665642919559 2.747965303818256764588819225017498226928383413594 -280013476189003789037102595366; 7.90855012010486596292301651700762740566952 -0385529814165533496068004049481879541 5.80053824479758902062481706965453241 -5472330486811972109474424685828814606507908; -0.637795818656920371541088075 -6844183677374026389856155422906369830058415644590413 -2.0028936957520668888 -34620177730737792086840865352599650431225243985504729582682] - [-4.9790679285952012187541502109092060960922684884016566542141281981951370 -58819989 -0.447802280501504479266980737110267283838110245554632687720931377 -3867632507524396; 2.1075987426257151042534701997702667642095781331428343708 -69666090586920555446921 5.1058625591508317272145030042532220995041342253579 -32992592590725964808152707638; 10.28945688427075189076163985400129153757320 -254794146611711502885318164179543556 6.094983889033111576967926294487602847 -936135224788700249445201084563875910205805; -2.3379601823905091756553011358 -48615086114228325654235362408126707833221420163013 -3.199638426555816452792 -373928308093548958105305825776884830968576591645009052217] + [0.7637548238660845090208795227226801216602325439453125 0.0158038668093469 +7807288102922029793262481689453125; 0.3474524613246083859507962188217788934 +7076416015625 0.37343280589831184812510400661267340183258056640625; 0.52497 +41961172385007472485085600055754184722900390625 0.5965552620587541987617896 +66605181992053985595703125; 0.635153286608922229561358108185231685638427734 +375 0.0636681103636593803685173043049871921539306640625] + [0.29457217844753976956794814101607456694510434469852826400545590074284410 +18512334 -0.039283332922574531178732154026607272871273293195963562158898804 +15259782944801773; 0.378821620917826343864678140096278331421648564292341421 +2352413183448967974505587 0.50491744373914834611925316914238591319220641843 +32191765745717723101353684876187; 0.382092777861873759006237424983547623700 +7127743430653265811901955884564812842144 0.61107924689751476238081710364253 +44713661746637196510174346769365511584466954883; 1.271337872187865731012978 +478823867003726651653645995407546118684087277042506695 0.126160049694481876 +7249738495845282735927546111132028070493637791268222071273071] + [-1.9892926282818617213240352055427900600018319298058145923659045998012856 +54028714 -0.235111120784467091849625313943648820159085439173821665548482789 +9847587802223395; -0.813371225913394308521073340158755896264088157703000247 +8340774692927415972822211 0.64580271757995047445474083578184225196994747568 +30282919468283988048549068462689; 1.491572332031762788566104404405841023565 +501199691316489350905513981020706849705 0.772784643555881009599750648971518 +4248589311334653244853686473727688680587681075; 2.0895260347720888111419002 +93447729680719551911839150040105633776524782622527076 0.1077920688514654991 +249483638957735418886356257930645139826182621601987936169665] + [-5.8436678475230145559003854599723534008955592214399688473743480348559670 +40730172 -0.244621598701266659412815405384677412649964563254688516098025581 +6090257332568621; -1.707192889125726061192346774799607909714152473589958414 +847727749571644452094953 1.011739730724958346516282298631557561506983002999 +382983968892012679679665624513; 6.79451521497870317413826390778699003480897 +7099874321061793239181996029918146766 1.10374903998600540887165121048819952 +8122411881177678714299407608197950715868868; 0.9229001986442570320090273422 +002826170810533780410310038624228847840313695021898 -0.27484129971364435695 +51732426008863968723967789200349515204777196169994997521221] + [-5.8605010633542207161236924181024214441631109165756855341676716742021308 +68055959 0.7644711886766404233745864222366199877188140868129878084792735637 +017321907148534; 4.74724138525243443495808168532036148717147951382437163082 +8072117068754136299995 2.13785988170593997345873110429821526170247409892348 +074551181062742286652617896; 14.7543422896124753852473461054474867628088907 +9392676665686535910762052379856644 0.72566897389483569085142652331044486534 +06569027086927786455719640515335201107109; -4.19139067862136911139645267600 +5122693145159813989552933040222072328265793321175 -0.9238562474921241195131 +32605179671938764041694184013554431872149434086221214728] + [-5.3744128793052812184456535476578691686998539935544727307983989440580883 +99021822 0.9249765388304762539468899210499841827662511126108836381305616581 +395393901378754; 5.90957132286666258627381236643856433428560567417523805948 +4723055014279238725487 2.26649528024961185300603818488951248912132517822791 +3594899289512245332760478566; 15.271333102751646217641691488776394852140018 +60815484588117891702797151001202751 0.6014570411302269580019855254582193867 +445483775727938036664581254761801864414245; -4.8309053298570960090549109490 +72624547520463158849500811539963393188081307745328 -0.972721147184919753984 +080364927216402798425139699116221968551185489280069931983] ```` @@ -1041,47 +1039,47 @@ sol = solve(prob) retcode: Success Interpolation: Automatic order switching interpolation t: 10-element Array{Float64,1}: - 0.0 - 0.04324956523726192 - 0.11321071740160932 - 0.19766180313092657 - 0.30258838818651473 - 0.41227782936810903 - 0.5472917650344715 - 0.6836815256385428 - 0.83571552907508 - 1.0 + 0.0 + 0.03205239800732855 + 0.09895426141282566 + 0.1823778419174073 + 0.2828280692410671 + 0.40449814208297546 + 0.5457855570638858 + 0.7045526160891851 + 0.856138015131654 + 1.0 u: 10-element Array{StaticArrays.SArray{Tuple{4,2},Float64,2,8},1}: - [0.24599623348395272 0.1814108490131281; 0.7708739473919768 0.529358641479 -1931; 0.2875377125306622 0.9317905900644217; 0.7375591147725589 0.951643897 -7048698] - [0.08262806295193584 -0.04183421547170835; 0.6839400434743584 0.5236711713 -173474; 0.29281353341537897 0.9642819812371652; 0.837663950789166 1.1392217 -54034667] - [-0.23918483474994076 -0.5050271924926594; 0.48253716125752355 0.405843814 -542289; 0.37649487916335544 1.1269321265179466; 0.9655816072157422 1.392108 -0695872687] - [-0.707356115818706 -1.2107082737819224; 0.17502667550873519 0.13554490669 -329494; 0.6199786613335732 1.5395352836258278; 1.051298907574082 1.58986983 -20170663] - [-1.368199607680919 -2.2454865535343576; -0.21983680350695328 -0.266165376 -3342805; 1.164008997882098 2.4312843658344923; 1.0286328220119376 1.6244650 -963768992] - [-2.0739169564939326 -3.386352082229682; -0.513349635226205 -0.54999398015 -93023; 2.0237638377535716 3.8340200867094527; 0.821539450526163 1.351058091 -9520478] - [-2.793480456055117 -4.588498937673334; -0.46913795883528414 -0.3127794049 -2284995; 3.4280007077225534 6.13769861923577; 0.2706288031634154 0.50214236 -43415781] - [-3.0963872009705744 -5.135754407467346; 0.3105135016542419 1.068674934858 -6093; 5.0398497142145455 8.807426511676754; -0.6382575575385778 -0.97801097 -35271589] - [-2.5465669507537756 -4.283558815399139; 2.3351470437134223 4.478239144417 -056; 6.615096625572361 11.449932032919943; -2.0347484151890463 -3.321401138 -795485] - [-0.4173836402111992 -0.7717855393236781; 6.005015507560791 10.63324567229 -428; 7.209465218424538 12.487348154949128; -3.827977037104813 -6.3971076701 -67191] + [0.5804069701197787 0.6081566479542033; 0.9418641877739737 0.0481315644732 +041; 0.7092190584215454 0.6294656779019507; 0.07430230080546174 0.595508208 +7592192] + [0.58035488061506 0.5155469883427757; 1.0282947861540435 0.125598587430595 +; 0.6384024027164247 0.5792156890453118; 0.15862052896702722 0.785276933962 +4651] + [0.5365781476545716 0.21440118695163585; 1.1366111386896796 0.157719362397 +953; 0.5039298469630689 0.5435714595661453; 0.3262219863912431 1.1603404715 +170809] + [0.4005489066481007 -0.36146233252069543; 1.1437208813267146 -0.0207585184 +51784086; 0.38025813298918343 0.676328262279411; 0.5110010379341184 1.56409 +24369417673] + [0.12572279451909574 -1.3230196745037563; 0.9933631123650289 -0.4723030050 +9434076; 0.33117516765677096 1.181581124881154; 0.6813476474737132 1.905664 +8972257086] + [-0.3380972505296776 -2.7828271755195564; 0.6570132626483132 -1.1464402771 +714133; 0.4684506923757258 2.413198019450224; 0.7833627573684587 2.01662778 +98309652] + [-0.9731465709232148 -4.618705973388045; 0.2229170315922806 -1.63644774445 +98433; 0.945498453166232 4.769138091097415; 0.7171657273661947 1.5866294378 +86209] + [-1.6302752380850851 -6.276077662813274; -0.0268886367410181 -0.9984804244 +18369; 1.8712796590107772 8.428461738252519; 0.3584308449045448 0.213806569 +0550377] + [-1.952912467467896 -6.634706900240984; 0.28394044297409693 1.640077555622 +5646; 2.9889379153279836 12.29874458840961; -0.2874779700449619 -2.06136048 +40772743] + [-1.7201214589663556 -4.99596692502776; 1.3051093798911246 6.5574719311210 +3; 3.976240515854327 15.257533807546377; -1.1523744802648688 -5.01009305632 +1093] ```` @@ -1094,10 +1092,10 @@ sol[3] ```` 4×2 StaticArrays.SArray{Tuple{4,2},Float64,2,8} with indices SOneTo(4)×SOne To(2): - -0.239185 -0.505027 - 0.482537 0.405844 - 0.376495 1.12693 - 0.965582 1.39211 + 0.536578 0.214401 + 1.13661 0.157719 + 0.50393 0.543571 + 0.326222 1.16034 ```` @@ -1121,16 +1119,18 @@ DiffEqTutorials.weave_file("introduction","01-ode_introduction.jmd") Computer Information: ``` -Julia Version 1.3.0 -Commit 46ce4d7933 (2019-11-26 06:09 UTC) +Julia Version 1.4.2 +Commit 44fa15b150* (2020-05-23 18:35 UTC) Platform Info: - OS: Windows (x86_64-w64-mingw32) - CPU: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz + OS: Linux (x86_64-pc-linux-gnu) + CPU: Intel(R) Xeon(R) CPU @ 2.30GHz WORD_SIZE: 64 LIBM: libopenlibm - LLVM: libLLVM-6.0.1 (ORCJIT, skylake) + LLVM: libLLVM-8.0.1 (ORCJIT, haswell) Environment: - JULIA_EDITOR = "C:\Users\accou\AppData\Local\atom\app-1.42.0\atom.exe" -a + JULIA_CUDA_MEMORY_LIMIT = 536870912 + JULIA_DEPOT_PATH = /builds/JuliaGPU/DiffEqTutorials.jl/.julia + JULIA_PROJECT = @. JULIA_NUM_THREADS = 4 ``` @@ -1138,5 +1138,50 @@ Environment: Package Information: ``` -Status `~\.julia\dev\DiffEqTutorials\Project.toml` +Status `/builds/JuliaGPU/DiffEqTutorials.jl/Project.toml` +[2169fc97-5a83-5252-b627-83903c6c433c] AlgebraicMultigrid 0.3.0 +[7e558dbc-694d-5a72-987c-6f4ebed21442] ArbNumerics 1.0.5 +[6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf] BenchmarkTools 0.5.0 +[be33ccc6-a3ff-5ff2-a52e-74243cff1e17] CUDAnative 3.1.0 +[159f3aea-2a34-519c-b102-8c37f9878175] Cairo 1.0.3 +[3a865a2d-5b23-5a0f-bc46-62713ec82fae] CuArrays 2.2.1 +[55939f99-70c6-5e9b-8bb0-5071ed7d61fd] DecFP 0.4.10 +[abce61dc-4473-55a0-ba07-351d65e31d42] Decimals 0.4.1 +[ebbdde9d-f333-5424-9be2-dbf1e9acfb5e] DiffEqBayes 2.15.0 +[eb300fae-53e8-50a0-950c-e21f52c2b7e0] DiffEqBiological 4.3.0 +[459566f4-90b8-5000-8ac3-15dfb0a30def] DiffEqCallbacks 2.13.3 +[f3b72e0c-5b89-59e1-b016-84e28bfd966d] DiffEqDevTools 2.21.0 +[77a26b50-5914-5dd7-bc55-306e6241c503] DiffEqNoiseProcess 4.2.0 +[9fdde737-9c7f-55bf-ade8-46b3f136cc48] DiffEqOperators 4.10.0 +[1130ab10-4a5a-5621-a13d-e4788d82bd4c] DiffEqParamEstim 1.14.1 +[055956cb-9e8b-5191-98cc-73ae4a59e68a] DiffEqPhysics 3.2.0 +[0c46a032-eb83-5123-abaf-570d42b7fbaa] DifferentialEquations 6.14.0 +[31c24e10-a181-5473-b8eb-7969acd0382f] Distributions 0.23.4 +[497a8b3b-efae-58df-a0af-a86822472b78] DoubleFloats 1.1.12 +[587475ba-b771-5e3f-ad9e-33799f191a9c] Flux 0.10.4 +[f6369f11-7733-5829-9624-2563aa707210] ForwardDiff 0.10.10 +[7073ff75-c697-5162-941a-fcdaad2a7d2a] IJulia 1.21.2 +[23fbe1c1-3f47-55db-b15f-69d7ec21a316] Latexify 0.13.5 +[c7f686f2-ff18-58e9-bc7b-31028e88f75d] MCMCChains 3.0.12 +[eff96d63-e80a-5855-80a2-b1b0885c5ab7] Measurements 2.2.1 +[961ee093-0014-501f-94e3-6117800e7a78] ModelingToolkit 3.1.1 +[2774e3e8-f4cf-5e23-947b-6d7e65073b56] NLsolve 4.4.0 +[8faf48c0-8b73-11e9-0e63-2155955bfa4d] NeuralNetDiffEq 1.5.0 +[429524aa-4258-5aef-a3af-852621145aeb] Optim 0.21.0 +[1dea7af3-3e70-54e6-95c3-0bf5283fa5ed] OrdinaryDiffEq 5.41.0 +[65888b18-ceab-5e60-b2b9-181511a3b968] ParameterizedFunctions 5.3.0 +[91a5bcdd-55d7-5caf-9e0b-520d859cae80] Plots 1.4.0 +[d330b81b-6aea-500a-939a-2ce795aea3ee] PyPlot 2.9.0 +[731186ca-8d62-57ce-b412-fbd966d074cd] RecursiveArrayTools 2.4.4 +[47a9eef4-7e08-11e9-0b38-333d64bd3804] SparseDiffTools 1.8.0 +[684fba80-ace3-11e9-3d08-3bc7ed6f96df] SparsityDetection 0.3.2 +[90137ffa-7385-5640-81b9-e52037218182] StaticArrays 0.12.3 +[f3b207a7-027a-5e70-b257-86293d7955fd] StatsPlots 0.14.6 +[789caeaf-c7a9-5a7d-9973-96adeb23e2a0] StochasticDiffEq 6.23.1 +[c3572dad-4567-51f8-b174-8c6c989267f4] Sundials 4.2.3 +[1986cc42-f94f-5a68-af5c-568840ba703d] Unitful 1.2.1 +[44d3d7a6-8a23-5bf8-98c5-b353f8df5ec9] Weave 0.10.2 +[b77e0a4c-d291-57a0-90e8-8db25a27a240] InteractiveUtils +[37e2e46d-f89d-539d-b4ee-838fcccc9c8e] LinearAlgebra +[44cfe95a-1eb2-52ea-b672-e2afdf69b78f] Pkg ``` diff --git a/markdown/introduction/figures/01-ode_introduction_13_1.png b/markdown/introduction/figures/01-ode_introduction_13_1.png index d459160c..5aa3cd6f 100644 Binary files a/markdown/introduction/figures/01-ode_introduction_13_1.png and b/markdown/introduction/figures/01-ode_introduction_13_1.png differ diff --git a/markdown/introduction/figures/01-ode_introduction_29_1.png b/markdown/introduction/figures/01-ode_introduction_29_1.png index 662b3087..5fef0986 100644 Binary files a/markdown/introduction/figures/01-ode_introduction_29_1.png and b/markdown/introduction/figures/01-ode_introduction_29_1.png differ diff --git a/markdown/introduction/figures/01-ode_introduction_30_1.png b/markdown/introduction/figures/01-ode_introduction_30_1.png index f3ae7438..46636ea2 100644 Binary files a/markdown/introduction/figures/01-ode_introduction_30_1.png and b/markdown/introduction/figures/01-ode_introduction_30_1.png differ diff --git a/markdown/introduction/figures/01-ode_introduction_31_1.png b/markdown/introduction/figures/01-ode_introduction_31_1.png index 6be88354..1b68bf3f 100644 Binary files a/markdown/introduction/figures/01-ode_introduction_31_1.png and b/markdown/introduction/figures/01-ode_introduction_31_1.png differ diff --git a/markdown/introduction/figures/01-ode_introduction_32_1.png b/markdown/introduction/figures/01-ode_introduction_32_1.png index 66b08f58..00fe7dee 100644 Binary files a/markdown/introduction/figures/01-ode_introduction_32_1.png and b/markdown/introduction/figures/01-ode_introduction_32_1.png differ diff --git a/markdown/introduction/figures/01-ode_introduction_4_1.png b/markdown/introduction/figures/01-ode_introduction_4_1.png index 3780e59b..4e71162a 100644 Binary files a/markdown/introduction/figures/01-ode_introduction_4_1.png and b/markdown/introduction/figures/01-ode_introduction_4_1.png differ diff --git a/markdown/introduction/figures/01-ode_introduction_5_1.png b/markdown/introduction/figures/01-ode_introduction_5_1.png index cee708f2..6ca17ad8 100644 Binary files a/markdown/introduction/figures/01-ode_introduction_5_1.png and b/markdown/introduction/figures/01-ode_introduction_5_1.png differ diff --git a/markdown/introduction/figures/01-ode_introduction_6_1.png b/markdown/introduction/figures/01-ode_introduction_6_1.png index 6bca7782..b426f886 100644 Binary files a/markdown/introduction/figures/01-ode_introduction_6_1.png and b/markdown/introduction/figures/01-ode_introduction_6_1.png differ diff --git a/notebook/introduction/01-ode_introduction.ipynb b/notebook/introduction/01-ode_introduction.ipynb index 0278795b..c37d009e 100644 --- a/notebook/introduction/01-ode_introduction.ipynb +++ b/notebook/introduction/01-ode_introduction.ipynb @@ -3,7 +3,7 @@ { "cell_type": "markdown", "source": [ - "# An Intro to DifferentialEquations.jl\n### Chris Rackauckas\n\n## Basic Introduction Via Ordinary Differential Equations\n\nThis notebook will get you started with DifferentialEquations.jl by introducing you to the functionality for solving ordinary differential equations (ODEs). The corresponding documentation page is the [ODE tutorial](https://docs.juliadiffeq.org/dev/tutorials/ode_example/). While some of the syntax may be different for other types of equations, the same general principles hold in each case. Our goal is to give a gentle and thorough introduction that highlights these principles in a way that will help you generalize what you have learned.\n\n### Background\n\nIf you are new to the study of differential equations, it can be helpful to do a quick background read on [the definition of ordinary differential equations](https://en.wikipedia.org/wiki/Ordinary_differential_equation). We define an ordinary differential equation as an equation which describes the way that a variable $u$ changes, that is\n\n$$u' = f(u,p,t)$$\n\nwhere $p$ are the parameters of the model, $t$ is the time variable, and $f$ is the nonlinear model of how $u$ changes. The initial value problem also includes the information about the starting value:\n\n$$u(t_0) = u_0$$\n\nTogether, if you know the starting value and you know how the value will change with time, then you know what the value will be at any time point in the future. This is the intuitive definition of a differential equation.\n\n### First Model: Exponential Growth\n\nOur first model will be the canonical exponential growth model. This model says that the rate of change is proportional to the current value, and is this:\n\n$$u' = au$$\n\nwhere we have a starting value $u(0)=u_0$. Let's say we put 1 dollar into Bitcoin which is increasing at a rate of $98\\%$ per year. Then calling now $t=0$ and measuring time in years, our model is:\n\n$$u' = 0.98u$$\n\nand $u(0) = 1.0$. We encode this into Julia by noticing that, in this setup, we match the general form when" + "## Basic Introduction Via Ordinary Differential Equations\n\nThis notebook will get you started with DifferentialEquations.jl by introducing you to the functionality for solving ordinary differential equations (ODEs). The corresponding documentation page is the [ODE tutorial](https://docs.juliadiffeq.org/dev/tutorials/ode_example/). While some of the syntax may be different for other types of equations, the same general principles hold in each case. Our goal is to give a gentle and thorough introduction that highlights these principles in a way that will help you generalize what you have learned.\n\n### Background\n\nIf you are new to the study of differential equations, it can be helpful to do a quick background read on [the definition of ordinary differential equations](https://en.wikipedia.org/wiki/Ordinary_differential_equation). We define an ordinary differential equation as an equation which describes the way that a variable $u$ changes, that is\n\n$$u' = f(u,p,t)$$\n\nwhere $p$ are the parameters of the model, $t$ is the time variable, and $f$ is the nonlinear model of how $u$ changes. The initial value problem also includes the information about the starting value:\n\n$$u(t_0) = u_0$$\n\nTogether, if you know the starting value and you know how the value will change with time, then you know what the value will be at any time point in the future. This is the intuitive definition of a differential equation.\n\n### First Model: Exponential Growth\n\nOur first model will be the canonical exponential growth model. This model says that the rate of change is proportional to the current value, and is this:\n\n$$u' = au$$\n\nwhere we have a starting value $u(0)=u_0$. Let's say we put 1 dollar into Bitcoin which is increasing at a rate of $98\\%$ per year. Then calling now $t=0$ and measuring time in years, our model is:\n\n$$u' = 0.98u$$\n\nand $u(0) = 1.0$. We encode this into Julia by noticing that, in this setup, we match the general form when" ], "metadata": {} }, @@ -640,11 +640,11 @@ "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", - "version": "1.3.0" + "version": "1.4.2" }, "kernelspec": { - "name": "julia-1.3", - "display_name": "Julia 1.3.0", + "name": "julia-1.4", + "display_name": "Julia 1.4.2", "language": "julia" } }, diff --git a/pdf/introduction/01-ode_introduction.pdf b/pdf/introduction/01-ode_introduction.pdf index 4a53d017..aae613ba 100644 Binary files a/pdf/introduction/01-ode_introduction.pdf and b/pdf/introduction/01-ode_introduction.pdf differ