Post Reply 
[WP 34s] Trouble finding root - (solved)
06-29-2015, 01:09 AM (This post was last modified: 06-29-2015 01:19 AM by Marcio.)
Post: #1
[WP 34s] Trouble finding root - (solved)
Hello all,

I am having troubles finding the root of the following equation:

\[0.05=\frac{x\times coth(x) - 1}{10x\times coth(10x) - 1}\]

to which I created the following program:

Code:

LBL 01
#10
*
ENTER
TANH
/
1
-
x<>y
ENTER
TANH
/
1
-
x<>y
/
#005
#100
/
-
END

1
5
SLV 01


The 34s will complain there is a domain error.

Hope I am missing something.

Thanks

Marcio

EDIT: Found the error. Problem solved!
Find all posts by this user
Quote this message in a reply
06-29-2015, 07:37 AM
Post: #2
RE: [WP 34s] Trouble finding root - (solved)
(06-29-2015 01:09 AM)Marcio Wrote:  EDIT: Found the error. Problem solved!

It would be interesting for others to know what went wrong and how you fixed it.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
Find all posts by this user
Quote this message in a reply
06-29-2015, 11:06 AM (This post was last modified: 06-29-2015 11:11 AM by RMollov.)
Post: #3
RE: [WP 34s] Trouble finding root - (solved)
(06-29-2015 01:09 AM)Marcio Wrote:  Hello all,

I am having troubles finding the root of the following equation:

\[0.05=\frac{x\times coth(x) - 1}{10x\times coth(10x) - 1}\]

to which I created the following program:

Code:

LBL 01
#10
*
ENTER
TANH
/
1
-
x<>y
ENTER
TANH
/
1
-
x<>y
/
#005
#100
/
-
END

1
5
SLV 01


The 34s will complain there is a domain error.

Hope I am missing something.

Thanks

Marcio

EDIT: Found the error. Problem solved!

You could save a few steps:
Code:
LBL 01
XEQ 00
X<>Y
SDL 001
ENTER
XEQ 00
/
#005
SDR002
-
RTN
LBL 00
TANH
/
1
-
END
Find all posts by this user
Quote this message in a reply
06-29-2015, 11:13 AM
Post: #4
RE: [WP 34s] Trouble finding root - (solved)
(06-29-2015 07:37 AM)Marcus von Cube Wrote:  
(06-29-2015 01:09 AM)Marcio Wrote:  EDIT: Found the error. Problem solved!

It would be interesting for others to know what went wrong and how you fixed it.

The 34s complained because the first guess I entered was zero.
Find all posts by this user
Quote this message in a reply
06-29-2015, 11:23 AM
Post: #5
RE: [WP 34s] Trouble finding root - (solved)
(06-29-2015 11:06 AM)RMollov Wrote:  You could save a few steps:
Code:
LBL 01
XEQ 00
X<>Y
SDL 001
ENTER
XEQ 00
/
#005
SDR002
-
RTN
LBL 00
TANH
/
1
-
END

Yes, much shorter. Thanks.
Find all posts by this user
Quote this message in a reply
06-29-2015, 06:59 PM (This post was last modified: 06-29-2015 07:05 PM by Dieter.)
Post: #6
RE: [WP 34s] Trouble finding root - (solved)
(06-29-2015 11:23 AM)Marcio Wrote:  Yes, much shorter. Thanks.

Both shorter and faster, using the some special 34s features:

Code:
LBL 01
TANH
/
DEC X
X<> Y
SDL 001
ENTER
TANH
/
DEC X
/
#005
SDR 002
-
END

1 [ENTER] 5 [SLV] 01
=> 1,64561382716

Dieter
Find all posts by this user
Quote this message in a reply
06-29-2015, 07:20 PM
Post: #7
RE: [WP 34s] Trouble finding root - (solved)
Indeed. Faster than the solver of the 35s too.
Find all posts by this user
Quote this message in a reply
08-05-2015, 01:40 AM (This post was last modified: 08-05-2015 01:44 AM by Marcio.)
Post: #8
RE: [WP 34s] Trouble finding root - (solved)
Code:

LBL 1
1
0
*
ENTER
TANH
/
1
-
x<>y
ENTER
TANH
/
1
-
x<>y
/
0
.
0
5
/
-
END

Gentlemen,

I have been trying to solve this equation for X using the 15C but it is not working.

Anyway, the code above will make the 15C output 0.0389, which is not correct. Could you identify what I am missing here?

Please note that there has been no attempt to optimize the given code.

Very much appreciated.

Marcio
Find all posts by this user
Quote this message in a reply
08-05-2015, 03:48 AM
Post: #9
RE: [WP 34s] Trouble finding root - (solved)
Marcio Wrote:  Could you identify what I am missing here?

Just remove the last "/", before the "-".
Find all posts by this user
Quote this message in a reply
08-05-2015, 04:03 AM
Post: #10
RE: [WP 34s] Trouble finding root - (solved)
(08-05-2015 03:48 AM)Didier Lachieze Wrote:  
Marcio Wrote:  Could you identify what I am missing here?

Just remove the last "/", before the "-".

Oh yes, I forgot to remove that extra /. Thanks.
Find all posts by this user
Quote this message in a reply
Post Reply 




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