Approximate sum with Euler's contant

How do I approximate the lowest number of n with Euler's constant (0.577) so that the sum is greater than 14,3?
How do I after that calculate the exact value of n?

3 件のコメント

Torsten
Torsten 2022 年 12 月 23 日
Hint:
For n large, your sum is approximately eulergamma + log(n). Can you solve
eulergamma + log(n) = 14.3
for n ?
Nathalie
Nathalie 2022 年 12 月 23 日
Yes, thank you! How do I calculate the exact value?
John D'Errico
John D'Errico 2022 年 12 月 23 日
Since you know ROUGHLY how far to go from the comment from @Torsten. Why not just form the sum using a while loop? You know that it will not go too far. Stop the while loop when it exceeds that amount. In fact, it will take only a moderately short loop. Or, you could use cumsum.
But you need to make an effort.

サインインしてコメントする。

回答 (1 件)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2022 年 12 月 23 日

0 投票

You may also try a symbolic math TB's function syms and solve(), e.g.:
syms x
Solution = solve(pi-sin(x)==1, x)
Solution = 
Solution_values = double(Solution) % Get the solution values in double format
Solution_values =
1.5708 - 1.3951i 1.5708 + 1.3951i

カテゴリ

ヘルプ センター および File ExchangeSymbolic Math Toolbox についてさらに検索

製品

リリース

R2022b

質問済み:

2022 年 12 月 23 日

回答済み:

2022 年 12 月 23 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by