Why is my last line coming up as an empty sym?
์กฐํ ์: 1 (์ต๊ทผ 30์ผ)
์ด์ ๋๊ธ ํ์
There's a couple steps to this problem. Expand and then simplify the equation. The last is to solve this equation: when x =2. But when I run it, it comes up empty
๐ฆ= (๐ฅ^3 +1)(๐ฅ^2 +2๐ฅโ5)(๐ฅ^2 โ3)^2
clear
syms x
x==2
y = (x^3+1)*(x^2+2*x-5)*(x^2-3)^2 %deleted "eqn =' double = leads to error
expand(y) %switch out "eqn" with "y"
simplify(y) %same as above
solve(subs(y,x,2),y)
๋๊ธ ์: 0
๋ต๋ณ (1๊ฐ)
Cris LaPierre
2021๋
10์ 22์ผ
I don't think you need to use solve in the final line. Substituting in 2 for x will return a value for y. There is nothing left to solve for.
syms x
y = (x^3+1)*(x^2+2*x-5)*(x^2-3)^2 %deleted "eqn =' double = leads to error
subs(y,x,2)
์ฐธ๊ณ ํญ๋ชฉ
์นดํ ๊ณ ๋ฆฌ
Help Center ๋ฐ File Exchange์์ Symbolic Math Toolbox์ ๋ํด ์์ธํ ์์๋ณด๊ธฐ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!