translating and solving an equation with values of x and y known

1 回表示 (過去 30 日間)
Griffin Murphy
Griffin Murphy 2021 年 9 月 21 日
コメント済み: Star Strider 2021 年 9 月 21 日
m = 2*x.^3-2*y-sqrt((x-y.^3)./(1+(x-y)./(x.^2+3))+((sin(x./y*pi))+exp(y/3)))
with x=3.53 and y=2.8
i get an answer of 82.3740 - 3.9723i

回答 (1 件)

Star Strider
Star Strider 2021 年 9 月 21 日
In the third term, the square root is of the numerator only, not the entire expression, amd the denominator does not appear to have been coded correctly.
x=3.53
x = 3.5300
y=2.8
y = 2.8000
m = 2*x.^3-2*y-sqrt(x-y.^3)./(1+((x-y)./(x.^2+3)))+sin(x./y*pi)+exp(y/3)
m = 84.1864 - 4.0986i
These changes only slightly change the result.
.
  3 件のコメント
Griffin Murphy
Griffin Murphy 2021 年 9 月 21 日
the professor said during class that someone got the answer right and i checked with that student to see if my answer was correct and he said no (to the one you gave me)
when I do the equation out regularly i get 83.5908318
Star Strider
Star Strider 2021 年 9 月 21 日
That change is significant (note the added parentheses in the square root argument).
x=3.53
x = 3.5300
y=2.8
y = 2.8000
m = 2*x.^3-2*y-sqrt((x-y).^3)./(1+((x-y)./(x.^2+3)))+sin(x./y*pi)+exp(y/3)
m = 83.5908
.

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

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by