Post Reply 
WP 34S integral in solve
01-15-2018, 12:37 AM
Post: #1
WP 34S integral in solve
Is there a way to have an integral in the solve application? How, for example, would I ask for integral x dx from 0 to x to equal 3 (the answer is ~2.45)?
Find all posts by this user
Quote this message in a reply
01-15-2018, 12:50 AM
Post: #2
RE: WP 34S integral in solve
Did a search...asked a similar question ~3 years ago. I'll resubmit if I have a difficulty with the answer on that thread...
Find all posts by this user
Quote this message in a reply
01-15-2018, 01:47 AM
Post: #3
RE: WP 34S integral in solve
They'll nest fine so long as there are enough program steps available for the temporary storage required. Remember that the integral routine is only an approximation and can be slow.


Pauli
Find all posts by this user
Quote this message in a reply
01-15-2018, 09:40 AM (This post was last modified: 01-15-2018 09:56 AM by Dieter.)
Post: #4
RE: WP 34S integral in solve
(01-15-2018 12:37 AM)lrdheat Wrote:  Is there a way to have an integral in the solve application? How, for example, would I ask for integral x dx from 0 to x to equal 3 (the answer is ~2.45)?

Sure. You can solve an integral and vice versa. Here's an example.

1. Define the function you want to integrate. Let's say this is ln(2+x).

LBL 01
2
+
LN
RTN

In your special case y=x this simply is

LBL 01
RTN

so that x itself is returned as the function value.

2. Define the function you want to solve. Here the integral from 0 to x is supposed to be 3. So this integral minus 3 equals zero (solve returns the zeros of a function).

LBL 02
0
x<>y
∫ 01
3

ROUND
RTN

This places 0 in Y and the (unknown) upper limit in X, calculates the integral and subtracts 3 from the result. Since the integral's accuracy depends on the display setting, the result is rounded. This way the calculation exits if e.g. in FIX 3 the integral is close enough to 3, say 3,0002 or 2,9999. This makes sure that the iteration doesn't get caught in an infinite loop and it also avoids unneccessarily long computation times.

So first of all, be sure to set a reasonable display mode

FIX 4

and try some guesses for the upper limit.

Assuming the ln function:

1 XEQ 02 => –2,0905
2 XEQ 02 => –0,8411
3 XEQ 02 =>   0,6609

So the solution is between 2 and 3.

Or with your y=x function:

1 XEQ 02 => –2,5000
2 XEQ 02 => –1,5000
3 XEQ 02 =>   1,5000

So for your function the upper limit also is between 2 and 3.

3. Now you can start Solve with these two guesses:

For the ln function:

2 ENTER 3
SLV 02 => 2,5780

For your y=x function:

2 ENTER 3
SLV 02 => 2,4495

Just to be sure, check the integral:

For the ln function:

0 ENTER 2,5780
∫ 01 => ∫≈3,0000

For your y=x function:

0 ENTER 2,4495
∫ 01 => ∫≈3,0000

That's it.

Dieter
Find all posts by this user
Quote this message in a reply
01-15-2018, 03:47 PM
Post: #5
RE: WP 34S integral in solve
Excellent!
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)