many edits
This commit is contained in:
1 parent
6e807edb46
commit
4f924557ad
45 files changed
+326
-296
No files matched your search
@@ -147,8 +147,8 @@ Incorporating parameters is readily done. For example to solve $f(x) = \cos(x) -
|
||||
|
||||
```{julia}
|
||||
f(x, p) = @. cos(x) - x/p
|
||||
u0 = (0, pi/2)
|
||||
p = 2
|
||||
u0 = (0.0, pi/2)
|
||||
p = 2.0
|
||||
prob = IntervalNonlinearProblem(f, u0, p)
|
||||
solve(prob, Bisection())
|
||||
```
|
||||
@@ -410,6 +410,7 @@ could be similarly approached:
|
||||
y = Area/x # from A = xy
|
||||
P = 2x + 2y
|
||||
@named sys = OptimizationSystem(P, [x], [Area]);
|
||||
sys = structural_simplify(sys)
|
||||
|
||||
u0 = [x => 4.0]
|
||||
p = [Area => 25.0]
|
||||
@@ -730,6 +731,6 @@ For a trivial example, we have:
|
||||
|
||||
```{julia}
|
||||
f(x, p) = [x[1], x[2]^2]
|
||||
prob = IntegralProblem(f, [0,0],[3,4], nout=2)
|
||||
prob = IntegralProblem(f, [0,0],[3,4])
|
||||
solve(prob, HCubatureJL())
|
||||
```
|
||||
Reference in new issue
Block a user