HP Forums
complicated cas problem - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: complicated cas problem (/thread-9544.html)



complicated cas problem - webmasterpdx - 11-21-2017 02:56 PM

I have 2 functions. The first is a staircase function:

f1=atan(cot(pi*x))/pi + x - 1/2

The second is basically, fermats equation...x^n + y^n = z^n
I can prove it only needs to be true in the positive domain....so I can use:
y = f2 = (z^n - x^n)^(1/n)
If n = 2, this is a circle.

So, I wanted to see where these 2 functions intersect as in:
f1(x) = f2(x)

I tried:

solve(f1(x) = f2(x),{x,y}) and I only get an empty square brackets (matrix) as a result.

Then I tried n:=2, and it tells me I have a bad argument.
I tried z:=5 and I get the same result.

How do I get the intersection of 2 functions like this algebraicly.

I know when I plot these functions with the values of z and n above, that (x,y) = (4,3) is a result....when I look at the plots....so it should be easy to solve.

???


RE: complicated cas problem - parisse - 11-21-2017 03:09 PM

You should first clarify what are the unknowns, how many equations you have and whether f1 and f2 are expressions or functions, and if they are functions which arguments they take.
Hint: if you have one equation and more than one unknown, you can't solve generically.


RE: complicated cas problem - webmasterpdx - 11-21-2017 04:07 PM

I'm using the new beta v2.
I also tried assume(z>y) assume(z>x)


RE: complicated cas problem - parisse - 11-21-2017 04:28 PM

Your post does not clarify anything, it's not a question of which firmware you are running, it's a question of clarifying the maths, especially the fact I hinted: you are searching 2 unknowns and you have only one equation.


RE: complicated cas problem - webmasterpdx - 11-21-2017 05:42 PM

Won't cas give you results in terms of the unknowns?
I do describe them as functions f1(x) and f2(x), with the unknowns x,y,z,n.

Then I tried to give n and z values, and it still didn't give me any results.

I actually have 2 equations/functions....f1(x) and f2(x)

f1(x) = y = atan(cot(pi*x))/pi + x - 1/2
f2(x) = y = (z^n - x^n)^1/n

Look at the examples for the help for solve. It does solve for 3 variables with 2 equations....
solve([x^2-y^2=0 x^2-z^2=0],[x y z]) ->
{[x x x],[x -x -x],[x x -x],[x -x x]}

So, I tried to simplify the problem a bit with:

f(x):=atan(cot(pi*x))/pi+x-1/2
g(x):=(25-x^2)^(1/2)
solve(f(x)=g(x),x)

and I get an error, as it gives me a blank matrix.

Also, I tried this:

f:=atan(cot(pi*x))/pi+x-1/2
g:=(25-x^2)^(1/2)

I thought that doing this should be the same as f(x):=, but it gave me a different result when I tried:

solve(f=g,x)

....it said that it was evaluating pi(x) instead of multiplying....and gave me an error????

Please try this out...someone familiar with CAS.
Thx
-Donald


RE: complicated cas problem - webmasterpdx - 11-21-2017 06:19 PM

I'm going to repost this problem as I discovered that it can crash the calculator where I had to hit the reset button....


RE: complicated cas problem - Arno K - 11-21-2017 08:29 PM

You will have to take into account that the calc will not try to simplify first, so it has to deal with a transcendental equation, I think you should try fsolve() here, that gives you the required [4.]. [attachment=5351]
Arno
Edit: This even works when I define y:="left-side" and z:="right-side", without the intervall there is a message telling you to better use an interval for bisection.