SciML / SciMLBook

Parallel Computing and Scientific Machine Learning (SciML): Methods and Applications (MIT 18.337J/6.338J)
https://book.sciml.ai/
1.84k stars 331 forks source link

derivation mistake in note 11 #68

Closed HoshiSora-95 closed 1 year ago

HoshiSora-95 commented 1 year ago

Suggestion derivation mistake on ODE adjoints

Identification Notes 11

Correction

$$ \int{t{0}}^{T}\lambda^{\ast}\left(s^{\prime}-f{u}s-f{p}\right)dt =\int{t{0}}^{T}\lambda^{\ast}s^{\prime}dt-\int{t{0}}^{T}\lambda^{\ast}\left(f{u}s-f{p}\right)dt $$

should be

$$ \int{t{0}}^{T}\lambda^{\ast}\left(s^{\prime}-f{u}s-f{p}\right)dt =\int{t{0}}^{T}\lambda^{\ast}s^{\prime}dt-\int{t{0}}^{T}\lambda^{\ast}\left(f{u}s+f{p}\right)dt $$

and that affects the latter derivations.

Screenshots

Additional context

ChrisRackauckas commented 1 year ago

Yes, I think I had a sign error. I noticed it when lecturing but haven't gotten back to correct it. A PR would be helpful.