Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hello All,
I am trying to recreate the solutions in Prime 10 to a 'characteristic equation' from a technical paper involving the Bessel functions.
The equation to be solved is shown below
The first 10 solutions is given as:
However it appears that the solve block essentially just returns my inputs
I have removed all units as I recall in the older versions of Prime that units in the solve block tend result in errors.
I have never had to use the Bessel functions, so I am not sure if I am overlooking something or making a simple error given how the equation is stated. Can anyone review and provide some guidance ?
Solved! Go to Solution.
Hi,
Solve blocks to find 5 results needs 5 equations where the solve block in question has only one.
What is needed is the root function like this
Cheers
Terry
Hi,
Solve blocks to find 5 results needs 5 equations where the solve block in question has only one.
What is needed is the root function like this
Cheers
Terry
Thank you for the clarification on the solve block.
Then when using the root function, changing the interval to (F(b),b,1,15) would not produce all of the results within the interval. Is there a way to do this without having to manually input each interval ?
For example, if I change the values of a,b, h and k I may not be able to easily tell where the intervals lie.
Hi,
AFAIK you need to use the function a number of times to find the roots using different ranges. You can use the root function in a Prime program.
You need to plot the equation to get a gauge of what ranges to use.
Cheers
Terry
@terryhendicott wrote:
Hi,
Solve blocks to find 5 results needs 5 equations where the solve block in question has only one.
Yes, and you get five equations if you use vectorization 😉
You have to use vectorization (the arrow over the expression, to get what you are looking for
Vectorization can be done from within the menu or using the appropriate keyboard shortcut.
Personally I would rather prefer to setup a function which gets the solution for its scalar argument beta and then call that function vectorized with your vector as function argument.
You may either turn a solve block into a function
or use the root function to do so
A numeric method in Prime will always just return one result depending on the given guess value and finding good guesses may be tricky sometime. A guess near to an expected solution might return another solution which is far away. And of course different guesses might result in the same solution.
Which way you choose, vectorization is always the key to success. Vectorization means that an equation or function which is written to deal with one single scalar argument can be used with a vector instead of the scalar and the elements of this vector are used as the scalar value
According finding all solutions of an equation within a given range, you sometime may have luck using the symbolics.
Sometimes its necessary to provide all values with integers only (83/100 instead of 0.83, etc.),
sometimes adding the modifier "fully" helps, sometime using the modifier "assume" (e.g. assume, 2<x<7) helps to get all solutions within a given range.
I had no luck doing so with your equation (or I was not patience enough to let the symbolic calc finish - it seems to run endless).
Here is a function which tries (no guarantee for success) to find all zeros of a function within a given range by using the root function with a lot of guess values (the last argument of that function), collecting all results, sorts the result and deletes duplicate value and also values which are outside of the given range.
The function works pretty well and fast with your equation.
Thank you very much for the detailed explanations. I guess it may be a bit easier to plot the graph and review.
However, I think I'll need to research some more into your other function to fully understand it.