• 0

Can you explain me how this formula works?


Question

Hello.

My girlfriend sister just came to me asking for help in understanding a formula she must use in university class.

Her problem is not passing the formula to code, but on how the formula works that was given..

Here is the question ( I'll try my best to translate to English ):

Calculate Hyperbolic sine sinh(x) using the formula given.

x represents the angle in Radians. The user must introduce the angle in the interval [-180,180]:

sinh.png

So where x I replace with the angle given by the user.

5! is a factorial meaning 5*4*3*2*1 = 120

But I'm lost how this formula actually works,, because I couldn't get it to calculate angle 3 it always gives me strange results.

How does that formula works to calculate sinh(3)?

Using online calculator sinh(3) = 10.01787492741

Thanks :)

10 answers to this question

Recommended Posts

  • 0

replace x with 3? Let's say you use the 5 terms you mentioned (should give you enough precision)

You get: 3 + 3^3/(1*2*3) ...

and so on, which gives you 10.01316964

Keep in mind that this formula expects the angle as a radian, not degrees

If you want more precision you have to add more terms like: x^11/(11!) + x^13/(13!)

Edited by XerXis
  • 0
replace x with 3? Let's say you use the 5 terms you mentioned (should give you enough precision)

You get: 3 + 3^3/(1*2*3) ...

and so on, which gives you

Keep in mind that this formula expects the angle as a radian, not degrees

PS: result 10.01316964

If you want more precision you have to add more terms like: x^11/(11!) + x^13/(13!)

You mean this right?

x + ( x^3/(1*2*3) ) + ( x^5/(1*2*3*4*5)) + ( x^7/(1*2*3*4*5*6*7) ) + ( x^9/(1*2*3*4*5*6*7*8*9) ) ?

Thank you for your answer :)

  • 0

yes :)

Following table gives you the formula for 3 with different numbers of terms, now you know how your calculator does it ;)

3 1 3 1 3 3

3 27 6 4,5 7,5

5 243 120 2,025 9,525

7 2187 5040 0,433928571 9,958928571

9 19683 362880 0,054241071 10,01316964

11 177147 39916800 0,004437906 10,01760755

13 1594323 6227020800 0,000256033 10,01786358

15 14348907 1,30767E+12 1,09728E-05 10,01787455

17 129140163 3,55687E+14 3,63072E-07 10,01787492

19 1162261467 1,21645E+17 9,55453E-09 10,01787493

21 10460353203 5,10909E+19 2,0474E-10 10,01787493

23 94143178827 2,5852E+22 3,64162E-12 10,01787493

Edited by XerXis
  • 0
yes :)

Thanks a lot I don't know how I couldn't see how easy it was..

But now I just tried inserting -180 using the expression I just posted and it gives me -5.478413264693229E14

Using this online calculator

http://www.kephyr.com/calculator/index.php...&=Calculate

It gives me sinh(-180) = -7.4469210039092E+77

Is this because of the precision you were referring to " If you want more precision you have to add more terms like: x^11/(11!) + x^13/(13!) "?

Thank you :)

  • 0

As said, this function requires it's input to be in radians, not degrees! Your calculator might do the conversion itself, this formula obviously does not :)

-180 degrees = -PI radians

I've included an excel sheet as attachment with the result of sinh on three different ways, have fun ;)

Sorry, can't upload an excel file here, download from: http://www.freedownloads.be/sinus_hyper.xls

  • 0

Thank you for patience, I really appreciate the help your giving :)

I study this some years ago at university, but not practicing or using this math for a couple of years made me forget a lot of it..

Again thank you very much :)

Now well I'm a little confused, because at first when I started this topic I was using 3 as an example and using that formula did work right, since the result was 10.013169642857143..

But how come if I was not using the conversion from degrees to radium when attributing 3 to x it work right?

  • 0

because 3 is smaller than PI and within the boundaries -PI + PI (-180 +180). The input 3 was actually a radian angle corresponding to 172 degrees

you might understand better if you look at the graph of sinus hyperbolicus:

http://en.wikipedia.org/wiki/File:Sinh_cosh_tanh.svg

Edited by XerXis
  • 0

Hi there :)

After a couple of days of not touching this, I'm at it again..

So what I'm doing is..

The user introduces say 5 degrees, I do the conversion from degrees to radians

x = 5 * 3.14 / 180

x = 0.05235988

I replace X with that number in the formula:

x + ( x^3/(1*2*3) ) + ( x^5/(1*2*3*4*5)) + ( x^7/(1*2*3*4*5*6*7) ) + ( x^9/(1*2*3*4*5*6*7*8*9) )

And it gives me a wrong result, after looking closely at your excel sheet, I still don't get what I'm doing wrong ( But I'm sure it's something really dumb I'm doing )

Thank you

  • 0
just as a shortcut, i beleive you can right 3*2*1 as 3! same with 7! and 9!

how do you know its wrong, what number are you looking for?

Oh I know, I was trying to make as simple as possible :)

So sinh(5) = 74.203210577789

What is giving me is x = 0.08733285794807455

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Samsung Galaxy Z Fold 8, Flip 8, Z Fold Wide: Everything you need to know The ONLY thing I need to know is the price, which I know will be way higher than I (and most people) are willing to pay for a phone... so basically nothing here I need to know. PS: Nice job getting that Apple reference to a non-existent and unrevealed product as "competition" in there. Cheque is in the mail.
    • Well I really think the repasting helped if your higher clocks have returned, maybe the next thing to look at is if there is a problem with your case airflow? I guess this because your 3080 has returned to optimal state, but is still staying too warm, which might suggest it was thermal throttling before you repasted, of which the only logical conclusion could be outside factors.
    • Samsung Galaxy Z Fold 8, Flip 8, Z Fold Wide: Everything you need to know by Hamid Ganji Galaxy Z Fold 7 - Image via Samsung The next generation of Samsung foldables is set to be unveiled next month at the second Unpacked event of the year. Samsung’s 2026 foldables are not expected to offer significant upgrades over their predecessors, with the Korean firm instead focusing on design refinements and conventional upgrades such as faster processors and better cameras. However, Samsung is reportedly planning to unveil an all-new passport-style foldable this year to rival Apple’s first foldable iPhone, which is expected to debut this September. Here’s a roundup of everything we know about Samsung’s upcoming foldable devices ahead of their official debut. When can we expect Samsung’s new foldables? The Galaxy Z Fold 7 and Z Flip 7 series were unveiled in July, and Samsung is expected to maintain this timeframe in 2026. Based on previous reports from Korean sources, Samsung will hold its Unpacked event on July 22 in London, UK, to pull back the curtain on the Galaxy Z Fold 8 series. The devices are also expected to hit the shelves a few weeks after launch. However, Samsung has yet to announce an official date. A new naming scheme? One of the most interesting changes we might see this year is a new naming scheme for Samsung’s latest foldables. SamMobile reported that since Samsung is expected to unveil three foldables this year, it has adopted a new naming strategy to simplify product identification for customers. Accordingly, the standard Galaxy Z Fold 8 will reportedly be called the Galaxy Z Fold 8 Ultra and will serve as the direct successor to last year’s Galaxy Z Fold 7. The “Ultra” suffix suggests the phone could feature higher-end specifications, such as additional rear camera modules. Samsung’s new passport-style foldable is expected to carry the Galaxy Z Fold 8 name without any suffix. This model is reportedly equipped with two rear cameras. No major changes are expected for the Flip model. Galaxy Z Fold 8 Ultra and Z Flip 8 anticipated specs Rumors over the past few months suggest Samsung is preparing several upgrades for its upcoming foldables, although the devices may continue to rely on larger batteries and faster charging speeds rather than dramatic design changes. The primary focus this year is expected to be the Galaxy Z Fold 8 and its wide-screen design. Galaxy Z Fold 8 Ultra official CAD renders - Image via AndroidHeadlines Here are the anticipated specifications for the Galaxy Z Fold 8 Ultra based on previous leaks: 6.5-inch outer display and 8-inch inner display, 120Hz refresh rate, and 2,600 nits peak brightness Snapdragon 8 Elite Gen 5 processor, paired with 12GB or 16GB of RAM and 256GB, 512GB, or 1TB of storage 4.1mm thickness when unfolded and a weight of 210g 200MP main camera, 50MP ultrawide camera, 10MP or 12MP telephoto camera, 10MP cover camera, and 10MP selfie camera 5,000mAh battery with 45W wired charging Android 17 and One UI 9 As for the Galaxy Z Flip 8, the device is not expected to be a major departure from its predecessor, although it could become slightly slimmer. Expected specifications include: Snapdragon 8 Elite Gen 5 or Exynos 2600 processor 12GB of RAM with 256GB and 512GB storage options 6.9-inch Dynamic AMOLED 2X inner dispaly and 4.1-inch Super AMOLED outer dispaly 50MP main camera, 12MP ultrawide camera, and 10MP selfie camera 4,300mAh battery with 25W wired charging Android 17 and One UI 9 Samsung’s foldables are also expected to launch with Gemini Intelligence, Google’s AI suite for automating tasks in Android ecosystem. Moreover, given current memory and component costs, some Galaxy Z Fold 8 Ultra and Z Flip 8 variants could see a price hike. Galaxy Z Fold 8 adopts a wide-screen design The centerpiece of the upcoming Unpacked event could be the Galaxy Z Fold 8, previously rumored as the Galaxy Z Fold Wide. This model adopts a passport-style form factor and is expected to compete directly with Apple’s iPhone Fold. Galaxy Z Fold 8 official CAD renders - Image via AndroidHeadlines Here’s what to expect: 7.6-inch primary OLED display and 5.4-inch cover display, 120Hz refresh rate, 2,600 nits peak brightness, and 4:3 aspect ratio Snapdragon 8 Elite Gen 5 processor, 12GB or 16GB of RAM, and 256GB, 512GB, or 1TB storage options 4,800mAh battery with 45W wired charging 50MP main camera, 50MP ultrawide camera, and 10MP selfie camera Android 17 and One UI 9 The three new foldable phones are unlikely to be the only devices unveiled at Samsung’s Unpacked event. The company is also expected to introduce the Galaxy Watch Ultra 2 and the Galaxy Watch 9 series.
    • Thanks
  • Recent Achievements

    • Week One Done
      rolfus earned a badge
      Week One Done
    • One Month Later
      Leroy Jethro Gibbs earned a badge
      One Month Later
    • Conversation Starter
      flexorcist earned a badge
      Conversation Starter
    • One Month Later
      AndreaB earned a badge
      One Month Later
    • One Month Later
      agatameier earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      504
    2. 2
      +Edouard
      196
    3. 3
      PsYcHoKiLLa
      140
    4. 4
      ATLien_0
      88
    5. 5
      Steven P.
      81
  • Tell a friend

    Love Neowin? Tell a friend!