Guidelines
The HP Community is where owners of HP products, like you, volunteer to help each other find solutions.
Archived This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
HP Recommended
HP Prime
Other

I'm trying to solve this 

undefined

So when I use the trig functions I don't have a result, then I "simplify" the equation and apply solve again and it works.

5 REPLIES 5
HP Recommended

You are using the solve() function in the CAS environment. This function is intended for symnolic solutions, but your parameters are real numbers. You might try the Solve app in the Home environnent for numerical solutions.

Otherwise, you could try to convert the decimal numbers to fractions using integer values. For example, replace 0.86 with 86/100.

HP Recommended
I know that but even if I am in CAS, why trig doesn't show results
HP Recommended

I agree that it is rather strange, but you can let it work properly in several ways.

 

First method: use tan(50.) and cos(50.) instead of tan(50) and cos(50)

Strange....

 

Second method: use 86/100 and –98/10 to do the calculations exactly.

 

Third method: instead of second argument x, use second argument x=100, to provide a guess.

This method only gives one solution.

 

Fourth method : instead of second argument x, use second argument

x= -100..100 to define the interval in which to search.

HP Recommended

Basically, it is not working because you are *specifically* telling it not to use exact CAS methods to find the solution. (you just don't realize that you are)

 

Most high end CAS systems are going to behave the same with in this regard. When you introduce approximate numerical values, only approximate numerical algorithms are going to be used. Mixing exact and non-exact systems does not work because the underlying algorithms are fundamentally different! Most low end CAS systems will silently make changes to inputs internally to "get the answer (high end CAS systems won't)". The Prime CAS will not make assumptions on your input.

 

 

 How are you introducting the "approximate" numbers in? Basically, any time you use a decimal you have changed the number from an "exact" valule, into an approximate one. When the CAS hits an approximate number, it throws it into the "solve this using a numerical alogrithm" mode.  There are some very simple ways to quickly get your answer though as have been explained. I'll give a simpler way with no manual need to change the input.

 

  1. Automatically convert your input into "exact" form.
    1. Type your input - solve(0.86 = (9*tan(50)+((-9.8)*9/(2*x^2*cos(50)^2))),x) and press ENTER.
    2. Note you get a result of [ ]. This means "there is no exact symbolic solution to your input here". In almost all cases, it doesn't mean "this cannot be solved", but rather "your input as given is not solveable exactly". Since the prime won't automatically do approximation when you asked for symbolic results, this is the correct behavior. Proceed with step 3/4 below.
    3. Now tap your input in the history to select it. WIth it tapped, press the [ a b/c ] key. You will get "exact(...)" surrounding your input, and the "result" will be a new equation with all your decimals converted to equivalent fractions : solve((43/50) = (9*tan(50)+(-49/5)*9/(2*x^2*cos(50)^2)),x)
    4. Evaluate that, and you get both your exact, symbolic results. Press SHIFT-ENTER to do a decimal approximation if that is what you want.
  2. The reason Jan_D's various methods work are as follows:
    1. When you do tan(50.) and similar, it is able to find a numerical result in the "default" interval for degree mode. Symbolic trig functions will not cause the CAS code to use the default "degree" interval. Since there are no "approximate degree" calculations, it does not fall into that branch of the code.
    2. This is equivalent to what I wrote above, just done in a manual way. Use the [ a b/c ] key here for quickest calculation.
    3. Providing a guess focuses the numerical algorithm in on an area. Normally, you'd use the command fsolve(...) instead of solve(...) for this, but it can take the guess as you've given.
    4. Providing the range also works in a similar way. solve(... , x= -4..4)), or solve( ... , x, -4..4) are identical inputs here.

 

 Hope that helps simplify things a bit more for you!

 

 

Basically, avoid decimal numbers in the CAS during your calculations and only perform the final "approximation" at the very end. Unsurprisingly, that is the way math is taught! 🙂

 

 

TW

Although I work for the HP calculator group as a head developer of the HP Prime, the views and opinions I post here are my own.
HP Recommended

Use of the  [a b/c] key is a good tip, Tim!

Archived This topic has been archived. Information and links in this thread may no longer be available or relevant. If you have a question create a new topic by clicking here and select the appropriate board.
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.