Info

Übungen

#timestamp 2025-09-19

![[NumCSE_week1_practice.cpp]]

#timestamp 2025-10-03

why squared loss?

(-> but sth. oder would also be possible)


least square solution:

(α,β)=argmin∑i=1m|yi−αxi−β|2=argmin L(α,β)∂L∂α=∑i=1m2(yi−αxi−β)(−xi)=!0⟹(∑i=1mxi2)α+(∑i=1mxi)β=∑i=1mxiyi∂L∂β=∑i=1m2(yi−αxi−β)(−1)=!0⟹(∑i=1mxi)α+nβ=∑i=1myi

=>

[∑xi2∑xi∑xin]⋅[αβ]=[∑i=1nxiyi∑i=1nyi]

=>

A⊤Ax=A⊤b

if matrix is sparse, we can introduce the residual r=Ax−b

A⊤Ax=A⊤b⟹A⊤(Ax−b)=0⟹A⊤r=0r=Ax−b⟹−r+Ax=b

=>

[−1AA⊤0][r→x→]=[b0]

#timestamp 2025-10-31

Pasted image 20251031084025.png

#timestamp 2025-

#timestamp 2025-11-29

do {
Eigen::Vector4d s = df(x).householderQr().solve(f(x));
x = x - s;
gn_update.push_back(s.norm());
// absolute stopping criteria
} while(gn_update.back() > tol);

Newton-Gauss method, see 8.11)d)

Hiptmair used

s.lpNorm<Eigen::Infinity>();

Infinity-norm stopping is better, because:

He also used

df(x).colPivHouseholderQr().solve(f(x));

The Jacobian in Gauss–Newton can easily become nearly rank-deficient, especially early in the iteration.
Without pivoting, householderQr() may produce an unstable or unusable step. colPivHouseholderQr() safeguards the solve by reordering the columns so that the effective conditioning is improved.

#timestamp 2025-12-05

Explicit Euler Method
- gets inaccurate pretty fast
+ easy to implement

E(h)=O(h) (order 1)

Implicit Euler Method

- more complicated, because yk+1 on both sides -> non-linear SE at every iteration
- not faster that explicit method (order 1) (?)

E(h)=O(h) (order 1)

Implicit Midpoint Method
- left and right side depend on value of next iterate -> non-linear SE

-> asymptotic of single-step methods can only be controlled by choosing the mesh

E(h)=O(h2) (order 2)

Bootstrap method
+ explicit -> linear SE
+ order p>2

Explicit Runge-Kutta Single-Step Method