1. 求解下列一元二次方程
Posted by haifeng on 2023-08-30 08:14:03 last update 2023-08-31 08:36:07 | Answers (3) | 收藏
求一元二次方程
(1) $112y^2+16y-7.68=0$
(2) $112x^2+16x-7=0$
(3) $x^2-14x-232=0$
Posted by haifeng on 2023-08-30 08:14:03 last update 2023-08-31 08:36:07 | Answers (3) | 收藏
求一元二次方程
(1) $112y^2+16y-7.68=0$
(2) $112x^2+16x-7=0$
(3) $x^2-14x-232=0$
Posted by haifeng on 2023-02-26 22:30:04 last update 2023-04-05 19:14:04 | Answers (0) | 收藏
Calculator 是计算器的意思, 是十分普通的. 因此应该起个比较特别的名字.
候选:
Souya, 数学的吴音. 或者 Sowya, 法语发音比较接近吴语中的“数学”发音.
THL , maTH Language. THL 也为了纪念家乡.
Posted by haifeng on 2023-02-24 22:33:00 last update 2023-02-28 15:21:33 | Answers (1) | 收藏
北太天元实现《数值分析》中的简单递推式 观察舍入误差的爆炸_哔哩哔哩_bilibili
使用 Calculator 求 $I_n=\int_0^1 \frac{x^n}{x+5}\mathrm{d}x$.
首先易得如下递推公式,
\[
I_n=-5*I_{n-1}+\frac{1}{n}
\]
事实上,
\[
\begin{split}
I_n&=\int_0^1 \frac{x^n}{x+5}\mathrm{d}x=\int_0^1 \frac{x^{n-1}(x+5)-5x^{n-1}}{x+5}\mathrm{d}x\\
&=\int_0^1 x^{n-1}\mathrm{d}x-5\int_0^1 \frac{x^{n-1}}{x+5}\mathrm{d}x\\
&=\frac{1}{n}x^n\biggr|_0^1 -5I_{n-1}\\
&=\frac{1}{n}-5I_{n-1}.
\end{split}
\]
于是, 我们可以使用 Calculator 中的函数 printRecursiveSeries 来求由递推公式所确定的序列 $I_n$, 这也是求积分的一个方法.
>> setprecision(20)
in> setprecision(20)
Now the precision is: 20
------------------------
>> printRecursiveSeries(-5*I_k+1/(k+1),I_k,0.0883922160302268689414,20,\n,linenumber)
in> printRecursiveSeries(0-5*I_k+1/(k+1),I_k,0.0883922160302268689414,20,\n,linenumber)
【1】 0.0883922160302268689414
【2】 0.0580389198488656552930
【3】 0.0431387340890050568650
【4】 0.0343063295549747156750
【5】 0.0284683522251264216250
【6】 0.0243249055410345585450
【7】 0.0212326151519700644150
【8】 0.0188369242401496779250
【9】 0.0169264899103627214850
【10】 0.0153675504481863925750
【11】 0.0140713386681589462150
【12】 0.0129766399925386022550
【13】 0.0120398769603839118050
【14】 0.0112291866266518695450
【15】 0.0105207335334073189450
【16】 0.0098963323329634052750
【17】 0.0093418677469476795050
【18】 0.0088462168208171580350
【19】 0.0084004948432826308750
【20】 0.0079975257835868456250
----------------
By Calculator
https://zhuanlan.zhihu.com/p/566572045
Posted by haifeng on 2023-02-22 19:56:51 last update 2023-02-23 22:04:52 | Answers (0) | 收藏
in> register(code)
This is the register code:
706f02c662ef45331a51abcd2b7dc3cfbe27bccf5bc57d02b751f22820b7d718
>>
atzjg, 2023-2-22
Posted by haifeng on 2023-02-04 14:18:28 last update 2023-02-04 14:18:28 | Answers (0) | 收藏
Hanoi 问题的递推关系为 $a_n=2a_{n-1}+1$, $a_1=1$.
>> printRecursiveSeries(2*n+1,n,1,10,\n)
in> printRecursiveSeries(2*n+1,n,1,10,\n)
3
7
15
31
63
127
255
511
1023
2047
------------------------
注意输入时 2*n+1 如果忘了乘号 *, 则有
>> printRecursiveSeries(2n+1,n,1,10,\n)
in> printRecursiveSeries(2n+1,n,1,10,\n)
22
223
2224
22225
222226
2222227
22222228
222222229
2222222230
22222222231
------------------------
Posted by haifeng on 2023-02-03 19:10:05 last update 2023-02-04 10:08:41 | Answers (0) | 收藏
------------------------
>> c=3
--------------------
>> a=1
--------------------
>> l=12
--------------------
>> u=21
--------------------
>> t=20
--------------------
>> o=15
--------------------
>> r=18
--------------------
>> c+a+l+c+u+l+a+t+o+r
in> 3+1+12+3+21+12+1+20+15+18
out> 106
------------------------
Posted by haifeng on 2022-09-21 11:40:26 last update 2022-09-21 11:40:26 | Answers (1) | 收藏
>> 3 * (2-6 %(3 -7))
in> 3*(2-6%(3-7))
out> 312
------------------------
>> 6%(-4)
in> 6%(-4)
out> -25
------------------------
>> 6%(4)
in> 6%(4)
out> 25
------------------------
>> 6%4
in> 6%4
out> 1
------------------------
Posted by haifeng on 2022-09-21 00:02:58 last update 2022-09-21 00:02:58 | Answers (0) | 收藏
解不定方程 $7x+4y=1$.
>> IndefiniteEquation(7,4)
in> IndefiniteEquation(7,4)
Solve the equation: 7*x+4*y = 1
7==1*4+3
4==1*3+1
1 1
test: 1==4*2-7*1
4*2-7*1 == 1
x = -1+4t
y = 2-7t
-----------***---------
>> IndefiniteEquation(7,4;1)
in> IndefiniteEquation(7,4;1)
Solve the indefinite equation :
7*X1+4*X2 = 1
u1=1-3*u0
---------------
X1 = -1*u1+u0
X2 = -1*X1+u1
------------------------
Posted by haifeng on 2022-09-18 14:41:44 last update 2022-09-19 16:41:52 | Answers (0) | 收藏
>> IndefiniteEquation(7,4,-2,3;2)
in> IndefiniteEquation(7,4,-2,3;2)
Solve the indefinite equation :
7*X1+4*X2-2*X3+3*X4 = 2
X4=2-2*u2-X1
---------------
X4 = +X4
X3 = +3*X1+2*X2+1*X4-u2
------------------------
>> IndefiniteEquation(7,4,-2,3;2)
in> IndefiniteEquation(7,4,-2,3;2)
Solve the indefinite equation :
7*X1+4*X2-2*X3+3*X4 = 2
X4=2-X1-2*u2
---------------
X1 = +X1
X3 = +3*X1+2*X2+1*X4-u2
------------------------
Posted by haifeng on 2022-09-18 14:40:09 last update 2022-09-18 14:40:09 | Answers (0) | 收藏
>> IndefiniteEquation(25,-13,7;4)
in> IndefiniteEquation(25,-13,7;4)
Solve the indefinite equation :
25*X1-13*X2+7*X3 = 4
u2=4-2u1
---------------
X2 = +2*u0+1*u2-u1
X1 = +1*X2-1*u2+u0
X3 = -3*X1+1*X2+u2
------------------------