testing ibpdv and ibpu - 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: testing ibpdv and ibpu ( /thread-3816.html) |

testing ibpdv and ibpu - salvomic - 05-12-2015 01:57 PM
hi all, I'm testing the "integration by parts" in the Prime. Inputting ibpu(x*sin(x),x) I get [-x*cos(x) cos(x)], ok with ibpdv(x*sin(x),sin(x) I get [x*sin(x)^2/cos(x) (-x*sin(x)^3-cos(x)*sin(x)^2-x*cos(x)^2)/cos(x)^2] I'm a bit confused: shouldn't I get the same result as above? Am I using wrong syntax? :-) Then another question: there is also a "integration by substitution" method in the Prime? thank you Salvo RE: testing ibpdv and ibpu - parisse - 05-12-2015 02:44 PM
The second argument of ibpdv should be the antiderivative of one term in the product. RE: testing ibpdv and ibpu - salvomic - 05-12-2015 02:45 PM
(05-12-2015 02:44 PM)parisse Wrote: The second argument of ibpdv should be the antiderivative of one term in the product. thank you! in fact, doing so it works well! ibpdv(x*sin(x),-cos(x) -> [-x*cos(x) cos(x)] Salvo RE: testing ibpdv and ibpu - Aries - 05-12-2015 07:45 PM
Hey Salvo, as to the integration by substitution, take a look here: http://www.hpmuseum.org/forum/thread-2265-post-20100.html#pid20100 Aries RE: testing ibpdv and ibpu - salvomic - 05-12-2015 07:59 PM
(05-12-2015 07:45 PM)Aries Wrote: Hey Salvo, thank you, Aries! I'm reading it and trying \[ \int_0^1{\sqrt{1-x^{2}}}dx \] assume(u>0); a:=subst('integrate(sqrt(1-x^2)),0,1,x)',x=sin(u)); a; and I get [u, π/4 π/4] Manually I have solution = (½)arcsin1 = π/4 (only?) Is it right? I thought to have this series: ∫cos(u)^2du, then (u/2)+(sin(2u))/4+c and finally (½)(arcsin(x)+x*sqrt(1-x^2)+c (changing also the integral bounds) ... However it's interesting this approach. Salvo RE: testing ibpdv and ibpu - Arno K - 05-12-2015 10:18 PM
Hello Salvo, as I am fairly new to the Prime I spend a lot of time trying it, so I entered your Integration example and got the list :[u, int(sqrt(1-sin(u)^2)*cos(u),u,0,PI/2),PI/4]. This is: [substitution var, new integral, result], your solution is only shown after a final hit on simplify. The list is produced because you are entering three commands in one line. So :simplify(subst('int(sqrt(1-x^2),x,0,1)',x=sin(u))) directly produces nothing but PI/4. Now I tried int(sqrt(1-x^2),x) to see what the Prime would deliver: the answer is too long to be typed here,containing i and LN aside the first part, I thought of getting:0.5*(x*sqrt(1-x^2)+arcsin(x)). So I entered: assume(x,float) and gave it a try, no change, I added: additionally(x>=0), still no change. By the way, Complex is switched off. Perhaps you or someone else can give it a try. Thanks, Arno edit: I now took the real Prime and entered the integral which clearly produced the same result, xcas on my Computer, xcas pad on my mobile and my formerly preferred cas (MathStudio for Android) delivered the simplified answer, which you provided and I had expected. I am a bit disappointed... RE: testing ibpdv and ibpu - parisse - 05-13-2015 05:14 AM
(05-12-2015 07:59 PM)salvomic Wrote: I'm reading it and tryingIt should be assume(u>0); a:=subst('integrate(sqrt(1-x^2),x,0,1)',x=sin(u)); a RE: testing ibpdv and ibpu - salvomic - 05-13-2015 07:18 AM
(05-12-2015 10:18 PM)Arno K Wrote: ... (05-13-2015 05:14 AM)parisse Wrote: It should be thank you Parisse! iw would be interesting also to have a method to get "step by step" solution, here and for the "integration by parts" functions, but anyway still already this is ok... Arno, please, control your CAS Settings: I've in CAS: Exact, "Use √" and Principal checked, Complex not checked (with firmware 6975) with the integral you should get (½)*ASIN(x)+(½)*x*√(-x^2-1) from 0 to 1, that's π/4 (in Home you gets 0.785398...) try, and let me know... Salvo RE: testing ibpdv and ibpu - Arno K - 05-13-2015 07:34 AM
Yes, the bounded integral is no problem, the one I tried later , int(sqrt(1-x^2),x) without boundaries, does not work. Arno RE: testing ibpdv and ibpu - salvomic - 05-13-2015 07:57 AM
(05-13-2015 07:34 AM)Arno K Wrote: Yes, the bounded integral is no problem, the one I tried later , int(sqrt(1-x^2),x) without boundaries, does not work. but have you already controlled the settings? perhaps it's that... I'm using textbook. Otherwise, I don't know I've the correct result also in emulator (firmware 6975) RE: testing ibpdv and ibpu - Arno K - 05-13-2015 08:16 AM
Hi Salvo, that are the same cas-Settings as mine, , Software Version is 6975 on the emulator as well as on my calculator, I am not able to get the symbolic integral, that is (½)*ASIN(x)+(½)*x*√(-x^2-1). PI/4 is no problem RE: testing ibpdv and ibpu - salvomic - 05-13-2015 08:33 AM
(05-13-2015 08:16 AM)Arno K Wrote: Hi Salvo, mystery... I think however it's only a settings' problem. Let's see... Have: CAS settings: simplify "minimum"; Home settings Entry "textbook", complex "a+b*i", allow complex output... ok (but those shouldn't change much)... Use helper on key C: insert ∫ and so on (without boundaries), I can see the graphic (textbook) integral, and after Enter I get the correct result. I'm in CAS mode, the "x variable" is x and it isn't "valued" (check that it doesn't have value or use use purge(x)). It *should* work by you RE: testing ibpdv and ibpu - Arno K - 05-13-2015 08:52 AM
Yes, you are right, I reset the Emulator, entered the integral and it worked fine. Now I reinstalled my backup, reentered the integral and got the same weird result than before. Your CAS Settings don't work either, the helper from key C doesn´t change anything. So it is up to me, to look for a solution, the Problem seems to be caused by one of the installed programs which I keep on the same level on both the emu and the calc, I now start thinking of having the emu empty for testing and then using these things on the calc Arno edit: after playing around with various settings I again reset the Emulator, then looked at the settings there, reinstalled the backup, set everything like in the fresh emu and it worked. The whole problem is caused by: use i, which I had checked in the cas-settings. I hadn't awaited that, this flag was, in my opinion, for the calc to be used for factorization of polynomials (I don't see the point where here a polynomial is factored but perhaps can M. Parisse help and make things clearer) and perhaps for output purposes of complex numbers , i.e. (3,5) versus 3+5*i, but it seems to influence other calculations as well. It would be nice if things like that, which are rather annoying, were clearly mentioned in the manual. RE: testing ibpdv and ibpu - salvomic - 05-13-2015 08:57 AM
(05-13-2015 08:52 AM)Arno K Wrote: Yes, you are right, I reset the Emulator, entered the integral and it worked fine. Now I reinstalled my backup, reentered the integral and got the same weird result than before. Your CAS Settings don't work either, the helper from key C doesn´t change anything. So it is up to me, to look for a solution, the Problem seems to be caused by one of the installed programs which I keep on the same level on both the emu and the calc, I now start thinking of having the emu empty for testing and then using these things on the calc Have already compared the Settings (both CAS and Home) in Emulator (after reset) and the Prime? Maybe there is one different... I don't know if a custom program could change the result of the integral, I think this is a bit strange... Try again and then tell us, I'm curious about this weird result. salvo RE: testing ibpdv and ibpu - Arno K - 05-13-2015 09:32 AM
(05-13-2015 08:57 AM)salvomic Wrote:see my edit above(05-13-2015 08:52 AM)Arno K Wrote: Yes, you are right, I reset the Emulator, entered the integral and it worked fine. Now I reinstalled my backup, reentered the integral and got the same weird result than before. Your CAS Settings don't work either, the helper from key C doesn´t change anything. So it is up to me, to look for a solution, the Problem seems to be caused by one of the installed programs which I keep on the same level on both the emu and the calc, I now start thinking of having the emu empty for testing and then using these things on the calc RE: testing ibpdv and ibpu - salvomic - 05-13-2015 09:43 AM
(05-13-2015 09:32 AM)Arno K Wrote: see my edit above I read! yes, I tried here: "use i" produce your same output, using "i" evaluating the integral, unchecking it, it works fine. RE: testing ibpdv and ibpu - parisse - 05-13-2015 02:43 PM
If you check use i (Xcas complex mode), you will get complex logarithms instead of inverse trigonometric functions. RE: testing ibpdv and ibpu - Arno K - 05-13-2015 05:22 PM
Hello parisse, yes, I noticed this behaviour as you can see above, but the help on this flag which can be seen in CAS-Settings claims something like: Use i to factor polynomials and not that it influences production on various kinds of results, so I thought it would not matter if switched on or off. Now I know better. Thanks Arno |