Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Hello, Everyone.
x.cos(x) - sin(x) = 0 solve , x ?
Thanks in advance.
Regards.
Solved! Go to Solution.
Is related to solving tan(x)-x=0:
You should be able to find local zeros using the bracketed root function:
root(x*cos(x)-sin(x),-1,1)=
root(x*cos(x)-sin(x),-5,-4)=
etc.
Success!
Luc
The symbolic "solve" will give you just the only exact solution (0).
All the others you'll have to find one by one using one of the numerical methods provided by Mathcad (solve block, root).
Many thanks Luc, F.M., and Werner. . Werner, I have a related issue, if you don't mind, please make correction the program function for a simple case :
You asked for something similar in another thread and I already explained that the program would have to be slightly modified to deal with the case when an interval hangs over the last limit you provide with your vector.
This should not have been that difficult.
Werner, Please make a correction for the program function, the above :
Or writting a slightly different approach.
Best Regards.
Just compare my program to the one you modified!
"R" instead of "r"
"last" instead of "rows"
Not sure what you think you get with your program, though.
Don't use functions posted here without fully understanding what exactly they do and why they were written the ways the were.
Would this help?
You're right.
And "could you attach *.xmcd ?"
Best Regards.
Werner, Yes this does help. And I guess I'm still not fully understanding what exactly they do. And Is there any way to make the "red" becomes the "green" ?
Best Regards.
You may consider increasing the step width Delta_x or the last precision parameter.
The method used is brute force. All values from x1 to x2 with stepwidth Delta_x are fed as guess value in the root function and then the results are sorted. Values outside the range x1,x2 are eliminated and values closer as prec are considered the same.
root sometimes gives quite inaccurate values here like -0.01 while it should return 0. So you would have to change prec to 10^-2 or even higher which on the other side could mean that you are missing some other zeros.
Here's a slightly different more stable looking approach using the interval variant of "root".
Hi liv107,
since it is a transcendent equation, you can solve it only numerically.
More roots - not free