Numerical Methods - 3.8 Nonlinear Equations

From testwiki
Revision as of 11:03, 28 June 2021 by Admin (talk | contribs) (Admin moved page Main Page to Verifying DLMF with Maple and Mathematica)
(diff) ← Older revision | Latest revision (diff) | Newer revision β†’ (diff)
Jump to navigation Jump to search


DLMF Formula Constraints Maple Mathematica Symbolic
Maple
Symbolic
Mathematica
Numeric
Maple
Numeric
Mathematica
3.8.E2 z = Ο• ⁒ ( z ) 𝑧 italic-Ο• 𝑧 {\displaystyle{\displaystyle z=\phi(z)}}
z = \phi(z)

z = phi(z)
z == \[Phi][z]
Skipped - no semantic math Skipped - no semantic math - -
3.8.E3 | z n + 1 - ΞΆ | < A ⁒ | z n - ΞΆ | p subscript 𝑧 𝑛 1 𝜁 𝐴 subscript 𝑧 𝑛 𝜁 𝑝 {\displaystyle{\displaystyle\left|z_{n+1}-\zeta\right|<A{\left|z_{n}-\zeta% \right|^{p}}}}
\abs{z_{n+1}-\zeta} < A\abs{z_{n}-\zeta}^{p}

abs(z[n + 1]- zeta) < A*(abs(z[n]- zeta))^(p)
Abs[Subscript[z, n + 1]- \[Zeta]] < A*(Abs[Subscript[z, n]- \[Zeta]])^(p)
Failure Failure
Failed [30 / 300]
Result: 0. < 0.
Test Values: {A = 1/2*3^(1/2)+1/2*I, p = 1/2*3^(1/2)+1/2*I, zeta = 1/2*3^(1/2)+1/2*I, z[n] = 1/2*3^(1/2)+1/2*I, z[n+1] = 1/2*3^(1/2)+1/2*I, n = 1}

Result: 0. < 0.
Test Values: {A = 1/2*3^(1/2)+1/2*I, p = 1/2*3^(1/2)+1/2*I, zeta = 1/2*3^(1/2)+1/2*I, z[n] = 1/2*3^(1/2)+1/2*I, z[n+1] = 1/2*3^(1/2)+1/2*I, n = 2}

Result: 0. < 0.
Test Values: {A = 1/2*3^(1/2)+1/2*I, p = 1/2*3^(1/2)+1/2*I, zeta = 1/2*3^(1/2)+1/2*I, z[n] = 1/2*3^(1/2)+1/2*I, z[n+1] = 1/2*3^(1/2)+1/2*I, n = 3}

Result: 1.414213562 < 0.
Test Values: {A = 1/2*3^(1/2)+1/2*I, p = 1/2*3^(1/2)+1/2*I, zeta = 1/2*3^(1/2)+1/2*I, z[n] = 1/2*3^(1/2)+1/2*I, z[n+1] = -1/2+1/2*I*3^(1/2), n = 1}

... skip entries to safe data
Failed [300 / 300]
Result: False
Test Values: {Rule[A, Power[E, Times[Complex[0, Rational[1, 6]], Pi]]], Rule[n, 1], Rule[p, Power[E, Times[Complex[0, Rational[1, 6]], Pi]]], Rule[ΞΆ, Power[E, Times[Complex[0, Rational[1, 6]], Pi]]], Rule[Subscript[z, n], Power[E, Times[Complex[0, Rational[1, 6]], Pi]]], Rule[Subscript[z, Plus[1, n]], Power[E, Times[Complex[0, Rational[1, 6]], Pi]]]}

Result: False
Test Values: {Rule[A, Power[E, Times[Complex[0, Rational[1, 6]], Pi]]], Rule[n, 2], Rule[p, Power[E, Times[Complex[0, Rational[1, 6]], Pi]]], Rule[ΞΆ, Power[E, Times[Complex[0, Rational[1, 6]], Pi]]], Rule[Subscript[z, n], Power[E, Times[Complex[0, Rational[1, 6]], Pi]]], Rule[Subscript[z, Plus[1, n]], Power[E, Times[Complex[0, Rational[1, 6]], Pi]]]}

... skip entries to safe data
3.8#Ex1 x n + 1 = Ο• ⁒ ( x n ) subscript π‘₯ 𝑛 1 italic-Ο• subscript π‘₯ 𝑛 {\displaystyle{\displaystyle x_{n+1}=\phi(x_{n})}}
x_{n+1} = \phi(x_{n})

x[n + 1] = phi(x[n])
Subscript[x, n + 1] == \[Phi][Subscript[x, n]]
Skipped - no semantic math Skipped - no semantic math - -
3.8#Ex2 Ο• ⁒ ( x ) = x + x ⁒ cot 2 ⁑ x - cot ⁑ x italic-Ο• π‘₯ π‘₯ π‘₯ 2 π‘₯ π‘₯ {\displaystyle{\displaystyle\phi(x)=x+x{\cot^{2}}x-\cot x}}
\phi(x) = x+x\cot^{2}@@{x}-\cot@@{x}

phi(x) = x + x*(cot(x))^(2)- cot(x)
\[Phi][x] == x + x*(Cot[x])^(2)- Cot[x]
Failure Failure
Failed [30 / 30]
Result: -.137590423+.7500000000*I
Test Values: {phi = 1/2*3^(1/2)+1/2*I, x = 1.5}

Result: .881577740e-1+.2500000000*I
Test Values: {phi = 1/2*3^(1/2)+1/2*I, x = .5}

Result: -1.144507621+1.*I
Test Values: {phi = 1/2*3^(1/2)+1/2*I, x = 2}

Result: -2.186628529+1.299038106*I
Test Values: {phi = -1/2+1/2*I*3^(1/2), x = 1.5}

... skip entries to safe data
Failed [30 / 30]
Result: Complex[-0.1375904227343937, 0.7499999999999999]
Test Values: {Rule[x, 1.5], Rule[Ο•, Power[E, Times[Complex[0, Rational[1, 6]], Pi]]]}

Result: Complex[-2.186628528411051, 1.299038105676658]
Test Values: {Rule[x, 1.5], Rule[Ο•, Power[E, Times[Complex[0, Rational[2, 3]], Pi]]]}

... skip entries to safe data
3.8.E6 x 2 = x 1 - x 1 - x 0 f 1 - f 0 ⁒ f 1 subscript π‘₯ 2 subscript π‘₯ 1 subscript π‘₯ 1 subscript π‘₯ 0 subscript 𝑓 1 subscript 𝑓 0 subscript 𝑓 1 {\displaystyle{\displaystyle x_{2}=x_{1}-\frac{x_{1}-x_{0}}{f_{1}-f_{0}}f_{1}}}
x_{2} = x_{1}-\frac{x_{1}-x_{0}}{f_{1}-f_{0}}f_{1}

x[2] = x[1]-(x[1]- x[0])/(f[1]- f[0])*f[1]
Subscript[x, 2] == Subscript[x, 1]-Divide[Subscript[x, 1]- Subscript[x, 0],Subscript[f, 1]- Subscript[f, 0]]*Subscript[f, 1]
Skipped - no semantic math Skipped - no semantic math - -
3.8.E7 z n + 1 = z n - ( Ο• ⁒ ( z n ) - z n ) 2 Ο• ⁒ ( Ο• ⁒ ( z n ) ) - 2 ⁒ Ο• ⁒ ( z n ) + z n subscript 𝑧 𝑛 1 subscript 𝑧 𝑛 superscript italic-Ο• subscript 𝑧 𝑛 subscript 𝑧 𝑛 2 italic-Ο• italic-Ο• subscript 𝑧 𝑛 2 italic-Ο• subscript 𝑧 𝑛 subscript 𝑧 𝑛 {\displaystyle{\displaystyle z_{n+1}=z_{n}-\frac{(\phi(z_{n})-z_{n})^{2}}{\phi% (\phi(z_{n}))-2\phi(z_{n})+z_{n}}}}
z_{n+1} = z_{n}-\frac{(\phi(z_{n})-z_{n})^{2}}{\phi(\phi(z_{n}))-2\phi(z_{n})+z_{n}}

z[n + 1] = z[n]-((phi(z[n])- z[n])^(2))/(phi(phi(z[n]))- 2*phi(z[n])+ z[n])
Subscript[z, n + 1] == Subscript[z, n]-Divide[(\[Phi][Subscript[z, n]]- Subscript[z, n])^(2),\[Phi][\[Phi][Subscript[z, n]]]- 2*\[Phi][Subscript[z, n]]+ Subscript[z, n]]
Skipped - no semantic math Skipped - no semantic math - -
3.8#Ex3 z n + 1 = Ο• ⁒ ( z n ) subscript 𝑧 𝑛 1 italic-Ο• subscript 𝑧 𝑛 {\displaystyle{\displaystyle z_{n+1}=\phi(z_{n})}}
z_{n+1} = \phi(z_{n})

z[n + 1] = phi(z[n])
Subscript[z, n + 1] == \[Phi][Subscript[z, n]]
Skipped - no semantic math Skipped - no semantic math - -
3.8#Ex4 Ο• ⁒ ( z ) = 3 ⁒ z 4 + 1 4 ⁒ z 3 italic-Ο• 𝑧 3 superscript 𝑧 4 1 4 superscript 𝑧 3 {\displaystyle{\displaystyle\phi(z)=\frac{3z^{4}+1}{4z^{3}}}}
\phi(z) = \frac{3z^{4}+1}{4z^{3}}

phi(z) = (3*(z)^(4)+ 1)/(4*(z)^(3))
\[Phi][z] == Divide[3*(z)^(4)+ 1,4*(z)^(3)]
Skipped - no semantic math Skipped - no semantic math - -
3.8#Ex7 Ξ” ⁒ s = r 3 ⁒ q 0 - r 2 ⁒ q 1 r 2 2 - β„“ ⁒ r 3 Ξ” 𝑠 subscript π‘Ÿ 3 subscript π‘ž 0 subscript π‘Ÿ 2 subscript π‘ž 1 superscript subscript π‘Ÿ 2 2 β„“ subscript π‘Ÿ 3 {\displaystyle{\displaystyle\Delta s=\frac{r_{3}q_{0}-r_{2}q_{1}}{r_{2}^{2}-% \ell r_{3}}}}
\Delta s = \frac{r_{3}q_{0}-r_{2}q_{1}}{r_{2}^{2}-\ell r_{3}}

Delta*s = (r[3]*q[0]- r[2]*q[1])/((r[2])^(2)- ell*r[3])
\[CapitalDelta]*s == Divide[Subscript[r, 3]*Subscript[q, 0]- Subscript[r, 2]*Subscript[q, 1],(Subscript[r, 2])^(2)- \[ScriptL]*Subscript[r, 3]]
Skipped - no semantic math Skipped - no semantic math - -
3.8#Ex8 Ξ” ⁒ t = β„“ ⁒ q 1 - r 2 ⁒ q 0 r 2 2 - β„“ ⁒ r 3 Ξ” 𝑑 β„“ subscript π‘ž 1 subscript π‘Ÿ 2 subscript π‘ž 0 superscript subscript π‘Ÿ 2 2 β„“ subscript π‘Ÿ 3 {\displaystyle{\displaystyle\Delta t=\frac{\ell q_{1}-r_{2}q_{0}}{r_{2}^{2}-% \ell r_{3}}}}
\Delta t = \frac{\ell q_{1}-r_{2}q_{0}}{r_{2}^{2}-\ell r_{3}}

Delta*t = (ell*q[1]- r[2]*q[0])/((r[2])^(2)- ell*r[3])
\[CapitalDelta]*t == Divide[\[ScriptL]*Subscript[q, 1]- Subscript[r, 2]*Subscript[q, 0],(Subscript[r, 2])^(2)- \[ScriptL]*Subscript[r, 3]]
Skipped - no semantic math Skipped - no semantic math - -
3.8#Ex9 β„“ = s ⁒ r 2 + t ⁒ r 3 β„“ 𝑠 subscript π‘Ÿ 2 𝑑 subscript π‘Ÿ 3 {\displaystyle{\displaystyle\ell=sr_{2}+tr_{3}}}
\ell = sr_{2}+tr_{3}

ell = s*r[2]+ t*r[3]
\[ScriptL] == s*Subscript[r, 2]+ t*Subscript[r, 3]
Skipped - no semantic math Skipped - no semantic math - -
3.8.E13 d z d Ξ± = - βˆ‚ ⁑ f βˆ‚ ⁑ Ξ± / βˆ‚ ⁑ f βˆ‚ ⁑ z derivative 𝑧 𝛼 partial-derivative 𝑓 𝛼 partial-derivative 𝑓 𝑧 {\displaystyle{\displaystyle\frac{\mathrm{d}z}{\mathrm{d}\alpha}=-\ifrac{\frac% {\partial f}{\partial\alpha}}{\frac{\partial f}{\partial z}}}}
\deriv{z}{\alpha} = -\ifrac{\pderiv{f}{\alpha}}{\pderiv{f}{z}}

diff(z, alpha) = -(diff(f, alpha))/(diff(f, z))
D[z, \[Alpha]] == -Divide[D[f, \[Alpha]],D[f, z]]
Error Failure -
Failed [210 / 210]
Result: Indeterminate
Test Values: {Rule[f, Power[E, Times[Complex[0, Rational[1, 6]], Pi]]], Rule[z, Power[E, Times[Complex[0, Rational[1, 6]], Pi]]], Rule[Ξ±, 1.5]}

Result: Indeterminate
Test Values: {Rule[f, Power[E, Times[Complex[0, Rational[1, 6]], Pi]]], Rule[z, Power[E, Times[Complex[0, Rational[1, 6]], Pi]]], Rule[Ξ±, 0.5]}

... skip entries to safe data
3.8.E16 d x d a 19 = - 20 19 19 ! derivative π‘₯ subscript π‘Ž 19 superscript 20 19 19 {\displaystyle{\displaystyle\frac{\mathrm{d}x}{\mathrm{d}a_{19}}=-\frac{20^{19% }}{19!}}}
\deriv{x}{a_{19}} = -\frac{20^{19}}{19!}

subs( temp=a[19], diff( x, temp$(1) ) ) = -((20)^(19))/(factorial(19))
(D[x, {temp, 1}]/.temp-> Subscript[a, 19]) == -Divide[(20)^(19),(19)!]
Failure Failure Skip - No test values generated
Failed [30 / 30]
Result: 4.309980412182177*^7
Test Values: {Rule[x, 1.5], Rule[Subscript[a, 19], Power[E, Times[Complex[0, Rational[1, 6]], Pi]]]}

Result: 4.309980412182177*^7
Test Values: {Rule[x, 1.5], Rule[Subscript[a, 19], Power[E, Times[Complex[0, Rational[2, 3]], Pi]]]}

... skip entries to safe data
3.8.E16 - 20 19 19 ! = ( - 4.30 ⁒ … ) Γ— 10 7 superscript 20 19 19 4.30 … superscript 10 7 {\displaystyle{\displaystyle-\frac{20^{19}}{19!}=(-4.30\dots)\times 10^{7}}}
-\frac{20^{19}}{19!} = (-4.30\dots)\times 10^{7}

-((20)^(19))/(factorial(19)) = (- 4.30) * (10)^(7)
-Divide[(20)^(19),(19)!] == (- 4.30) * (10)^(7)
Translation Error Translation Error Skip - symbolical successful subtest Skip - symbolical successful subtest
3.8.E17 z n + 1 = Ο• ⁒ ( z n ) subscript 𝑧 𝑛 1 italic-Ο• subscript 𝑧 𝑛 {\displaystyle{\displaystyle z_{n+1}=\phi(z_{n})}}
z_{n+1} = \phi(z_{n})

z[n + 1] = phi(z[n])
Subscript[z, n + 1] == \[Phi][Subscript[z, n]]
Skipped - no semantic math Skipped - no semantic math - -