SciML / DiffEqDocs.jl

Documentation for the DiffEq differential equations and scientific machine learning (SciML) ecosystem
https://docs.sciml.ai/DiffEqDocs/stable/
Other
278 stars 245 forks source link

Typo in continous adjoint example? #530

Closed DrVogt closed 2 years ago

DrVogt commented 2 years ago

Howdy,

Here: https://diffeq.sciml.ai/stable/analysis/sensitivity/#Example-continuous-adjoints-on-an-energy-functional

In the documentation it says:

function dg(out,u,p,t)
  out[1]= u[1] + u[2]
  out[2]= u[1] + u[2]
end

is this a typo? I'd think it would be

function dg(out,u,p,t)
  out[1]= u[1] 
  out[2]= u[2]
end

If this is not a typo, why is this it?

ChrisRackauckas commented 2 years ago

(u1 + u2)^2 / 2 there's a mixed term.