it would be y=2^2 + log pi sinx
PLEASE SOLVE THE EXPRESSION
7 views (last 30 days)
Show older comments
PLEASE SOLVE THE EXPRESSION
y=2^2 + log?sinx
USING MATLAB.
Answers (1)
Walter Roberson
on 11 Feb 2011
What does your ? indicate?
If your expression is y = 2^2 + log(sin(x)) and you need to solve for x, then
y - 2^2 = log(sin(x))
exp(y - 2^2) = exp(log(sin(x))
exp(y - 2^2) = sin(x)
arcsin(exp(y - 2^2)) = x
You can do this mechanically in Matlab if you have the Symbolic toolbox.
If you need to solve it numerically for a given y, then consider solving the expression
2^2 + log(sin(x)) - y = 0
perhaps using fzero()
2 Comments
Walter Roberson
on 11 Feb 2011
y - 2^2 = log(pi*sin(x))
exp(y - 2^2) = exp(log(pi*sin(x))
exp(y - 2^2) = pi*sin(x)
exp(y - 2^2)/pi = sin(x)
arcsin(exp(y - 2^2)/pi) = x
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!