
Discussion BoardsOpen MenuDiscussion Boards Open Menu

BlogsOpen Menu

HP Notebook Battery Recall and ReplacementOpen MenuHP Notebook Battery Recall and Replacement Open Menu
In cooperation with various government regulatory agencies, HP has announced an expansion of its June 2016 worldwide voluntary safety recall and replacement program for certain notebook batteries. Additional batteries are affected.
 HP Support Forum Home
 >
 Tablets
 >
 Calculators
 >
 how to solve an intergral equation of circular function with...
 Subscribe
 Mark Topic as New
 Mark Topic as Read
 Float this Topic to the Top
 Bookmark
 Subscribe
 Printer Friendly Page
how to solve an intergral equation of circular function with domain restrictions
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
02282017 06:10 PM
how to solve an intergral equation of circular function with domain restrictions?
for example, find the value of b for the equation
int(cos(2x), 3*pi/4,b)=0.25, where 3*pi/4<b<5*pi/4
I enter:
solve(int(cos(2x), 3*pi/4,b)=0.25, b)3*pi/4<b<5*pi/4
but the above HP Prime command did not work. Later I asked several Maths teachers, they did not know how to deal with them too.
How do we figure out it?
note: this question is from a VCE quesiton (Victoria certificate equation in australia)
Re: how to solve an intergral equation of circular function with domain restrictions
[ Edited ]
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
03022017 09:00 AM  edited 03022017 09:40 AM
Hello,
The CAS in Prime behaves more like all the "real" CAS systems out there. Namely, you make an assumption about a variable, then do the operation and continue working with those assumptions. Thus the "planned" way to do this is:
1. make your assumption (note your variable needs to come first  it is "storing" the assumption into the variable).
assume( b>(3*π/4) AND b<(5*π/4)) < "3*pi/4<b" doesn't work because b is on the right  keep your variable to the "left" of the assumption
2. Now you have the assumptions stored, try your original input:
solve((int(cos(2*x),x,3*π/4,b)) = (1/4),b)
3. Out pops the expected result.
4. Note that you have assumptions stored in b, and they will remain until you remove them. To do so, run purge(b) and it will remove the assumption values stored on b.
I personally thought this was kind of strange and wonky at first. Then, I understood why it behaves this way. Using this method of making assumptions on variables allows much more powerful assumptions to be made and is why all the high power CAS systems follow the same type of methodology. You can do things like assume a variable is a specific object type (real, complex, member of a subset, etc) and other much more complex things that would just be very difficult to do in a single  statment.
In addition, you very often continue working with those restrictions on that variable as you continue working the problem. It kind of follows the way you would do a mathematical proof in some ways  you start applying assumptions about variables, and then work your way through the problem.
HOWEVER, you can do this in a single operation. If you really do want to make a temporary assumption, follow the same recommendations regarding your variables ONLY being on the left side. This will ALSO work:
(solve((int(cos(2*x),x,3*π/4,b)) = (1/4),b)((b>(3*π/4)) AND (b<(5*π/4)))) < (note b in the  always appears to the left of the < or > or >= or <> and similar  don't put your variable on the right side)
Out pops the same result.
Feel free to ask some more questions if you get stuck! :)
TW
Although I work for the HP calculator group, the views and opinions I post here are my own.
Re: how to solve an intergral equation of circular function with domain restrictions
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
03022017 10:52 AM
Tim_Wessman wrote:
You can do things like assume a variable is a specific object type (real, complex, member of a subset, etc) ....
That is interesting, Tim.
How do you assume that a variable is real?
Re: how to solve an intergral equation of circular function with domain restrictions
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
03022017 12:18 PM
Here's some examples of possible assumptions:
assume((a>=2 and a<4) or a>6)
assume(x>0); additionally(x,float);
assume(x,integer);
assume(x,complex);
The main 3 categories most applicable here are: "float", "integer", "complex".
about(x) would return the assumptions made about x currently.
Also, as a note to the original poster  I'm working with the CAS author regarding accepting things like 0<b directly rather then requiring it to be flipped, and also things like 0<b<2 or similar directly. That might be a possible future improvement that can be made. Thanks for the question!
TW
Although I work for the HP calculator group, the views and opinions I post here are my own.
Re: how to solve an intergral equation of circular function with domain restrictions
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
03032017 12:07 PM
Tim_Wessman wrote:Here's some examples of possible assumptions:
assume((a>=2 and a<4) or a>6)
assume(x>0); additionally(x,float);
assume(x,integer);
assume(x,complex);
The main 3 categories most applicable here are: "float", "integer", "complex".
about(x) would return the assumptions made about x currently.
Thank you.
I see that the example:
assume(x,integer)
is given in the user manual but not in the built in Help.
I found out that another way of writing is:
assume(x,2) or assume(x,DOM_INT) and that we can get the types by e.g.
type(3.56) which returns DOM_FLOAT.
Re: how to solve an intergral equation of circular function with domain restrictions
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
03052017 02:21 PM
Dear Tim,
thank you.
I have solved the question by inputing
command (1): "assume( b>(3*π/4) AND b<(5*π/4))"
command (2) "(solve((int(cos(2*x),x,3*π/4,b)) = (1/4),b)((b>(3*π/4)) AND (b<(5*π/4)))) "
But if i change 1/4 into 0.25 in the command (2), then no solution is found, why?
Re: how to solve an intergral equation of circular function with domain restrictions
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
03052017 05:29 PM
That changes it from an exact, symbolic system into one that is "approximate" with nonexact numbers. Basically, keep decimals out of your symbolic calculations as that throws the CAS into a mode where it will use numerical algorithmns and similar. Most CAS systems behave this way  it can be confusing to new users though.
TW
Although I work for the HP calculator group, the views and opinions I post here are my own.
Re: how to solve an intergral equation of circular function with domain restrictions
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
03062017 08:16 AM
Another way to solve the problem is thus:
Or:
So in the last example we entered the vector: [f=1/4, 3*pi/4<b, b<5*pi/4]
Re: how to solve an intergral equation of circular function with domain restrictions
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
03072017 06:00 AM
It is also possible to solve the problem numerically, and use 0.25 instead of ¼, but in that case we have to use fsolve instead of solve.
Then we get: