Experiments and deeper practice 0
Understand the concept
Quick checks
Answer each question before moving on. Your selections are saved locally.
Write Julia yourself
Drafts are saved locally per lesson. Importing .jl replaces the current draft after confirmation.
Success criteria:
Combine your saved Julia functions
- Lesson 12 · solve_checked
- Lesson 16 · solution_sensitivity
The file includes your current integration code and the two saved mission drafts. If a draft is missing, its incomplete starter is used. Export never changes existing drafts.
View combined source and tests
View generated Julia tests
Run the downloaded test in Julia, or use the local companion after disabling JDoodle. Local execution runs the Test assertions on your computer without awarding a course grade. A failure identifies a case to investigate, not the only possible defect.
View focused Julia test
Run the selected case in Julia to reproduce a failure. After editing your code, run the full test file to check for regressions.
Design the function
- Inputs
- Return value
View incomplete Julia scaffold
Test an algorithm property
Explain the expected relationship
View property test source
Inspect Julia terminal errors
Planning cue
Additional case to test
Hint 1 · Concept
Hint 2 · Approach
Hint 3 · Last step
Mixed semester rehearsal
Plots.jl practice
Prepare AMP submission (.jl, code PDF and ZIP)
ZIP contents
Both AMP Übung 1 and Übung 2 require a .jl file and a PDF of its code per program, bundled as a ZIP for ILIAS. Use your actual name and matriculation number. ZIP assembly does not verify program correctness, PDF/source identity or ILIAS submission. No identity, selected PDF or ZIP is stored by Julia Lab.
Export or restore Julia Lab learning data
Export saved lesson drafts, transfer/debug drafts, trace positions and quiz answers. Excludes JDoodle settings, runner session codes and submission identity.
Explore norms and transformations
- Matrix
- v
- A·v
- ||v||ℓ₂
- ||A·v||ℓ₂
- det(A)
The boundary is ||v|| = 1 in the chosen norm. Its direct image A(boundary) generally differs from the inverse image A⁻¹(boundary), which is the unit boundary of ||A·v||. These are JavaScript numerical illustrations, not Julia executions or mathematical proofs.
Trace Gaussian elimination
| Row | a₁ | a₂ | a₃ | b |
|---|
Julia code for this system
Row operations and residuals are calculated in this browser using JavaScript floating-point arithmetic. Run the separate Julia example in a compiler to compare results. A small residual does not by itself guarantee a small solution error.
Floating-point error and convergence
Step size h = · Reference cos(x) =
Horizontal: exponent k in h = 10⁻ᵏ. Vertical: absolute error (logarithmic). Rounded-zero errors cannot be displayed on a log axis.
| Method | Estimate | Absolute error | Observed order |
|---|
Julia code for this comparison
Calculated with JavaScript Float64-like binary64 arithmetic, using cos(x) as a floating-point reference. These measurements are not Julia execution, an exact-error oracle, convergence proof, or coding mastery.
Explore linear least squares
- Sum of squared residuals (SSE)
- Residual 2-norm
- Gradient (∂SSE/∂a, ∂SSE/∂b)
- Minimum SSE
- SSE above minimum
| x | Observed y | Predicted y | Residual |
|---|
Julia least-squares example
Fitted parameters and errors are calculated in the browser using JavaScript binary64. This is not Julia execution, a proof of numerical stability, or coding mastery.
Predict program state
total before iteration:
| Iteration | Loop values | Before | After |
|---|
No iterations completed.
Predictions are checked against the shown program's modeled state. This does not execute learner-authored Julia code or award coding mastery.
Explore QR and Cholesky
A
Q
R
Julia factorization example
Calculations use JavaScript binary64 on fixed 2×2 matrices. Norms and failure classifications are numerical examples, not Julia execution, general factorization proofs or coding grades.
Explore conditioning and solution sensitivity
- Original solution x
- Perturbed solution x̃
- Solution difference x̃ − x
- Absolute solution change ||x̃ − x||₂
- Residual against original b: ||Ax̃ − b||₂
- Residual against perturbed b + δb
- Relative data change ||δb||₂ / ||b||₂
- Relative solution change ||x̃−x||₂ / ||x||₂
- Condition number κ₂(A)
- Relative-error upper bound κ₂ · relative data change
- Observed relative amplification
| a₂₂ | κ₂(A) | ||x̃−x||₂ | Relative solution change | Observed amplification |
|---|
Julia code for this system
The condition number is a worst-case relative-sensitivity bound, not an observed error for every b. Solutions use the diagonal formula evaluated in JavaScript binary64; tiny roundoff differences may occur. This is not Julia execution, a solver-stability test, or coding mastery.
Übung 2 · Numerical experiments
Quadratic roots: conditioning and cancellation
For x² − 2ax + b = 0 with a > 0 and 0 < b ≤ a², compare direct subtraction with the algebraically equivalent rationalized smaller root. Nearly coincident roots are inherently sensitive; subtracting nearly equal numbers can also cause avoidable numerical error.
Parameter sweep
| δ | Direct | Stable | Relative discrepancy | Condition |
|---|
Julia/PrettyTables source for this experiment
Relative condition: finite perturbations
For differentiable f and x ≠ 0, f(x) ≠ 0, compare |xf′(x)/f(x)| with finite relative input perturbations. A finite difference approximates this limiting quantity but does not prove it.
Analytic relative condition:
| ε | Finite observed amplification | Difference from analytic condition |
|---|
Julia source for this comparison
Independent numerical programming
Julia Test cases
Copy the starter into the existing lesson code editor. Implement it, then download a Julia Test file for the source currently in that editor. The browser does not grade your code.
Least-squares methods: QR and normal equations
| Row | t | y |
|---|
| Method | [Intercept, slope] | ||A·c−y||₂ | ||Aᵀ(A·c−y)||₂ |
|---|
Run the same comparison in Julia
Browser computations use JavaScript binary64, not Julia. QR is computed with Householder reflections. The rank warning uses a numerical tolerance and does not prove mathematical rank.
Deeper Julia and numerical reasoning
Independent implementation
Numerical experiment
Mathematical proof practice
Prove or explain:
Independent transfer:
Written reasoning is not automatically checked or graded.
Debug a Julia program
Expected behavior:
Hint 1
Hint 2
Show one reference repair