solve 2 equations with two sympolic variables

I want solve these equations with the same variables U10 and U20 because they are part of other code
2*U20 + sin(U20)
2*U10 + sin(U10 - 1) - 2

回答 (1 件)

Walter Roberson
Walter Roberson 2023 年 2 月 24 日

0 投票

Those are independent equations. Over the reals they have one solution each. U20=0, U10=1

3 件のコメント

Adham Ahmed
Adham Ahmed 2023 年 2 月 24 日
Hi
I need a code
thank you
Askic V
Askic V 2023 年 2 月 24 日
First of all those are NOT equations. The equation can be for example: 2*U20 + sin(U20) = 0
We can assume that you mean that both expressions are equal to zero.
If that is the case, the code is very simple:
syms U20
f = solve(2*U20 + sin(U20), U20)
Warning: Unable to solve symbolically. Returning a numeric solution using vpasolve.
f = 
0
So the solution is zero, just like Walter told you.
Walter Roberson
Walter Roberson 2023 年 2 月 24 日
syms U20
f = (2*U20 + sin(U20))
f = 
fplot(f, [-pi pi]); xline(0); yline(0)
Exactly 0.

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

カテゴリ

ヘルプ センター および File ExchangeGeneral Applications についてさらに検索

タグ

質問済み:

2023 年 2 月 24 日

コメント済み:

2023 年 2 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by