create account

Computation Contest #4 [2 SBI] by quantumdeveloper

View this thread on: hive.blogpeakd.comecency.com
· @quantumdeveloper ·
$0.35
Computation Contest #4 [2 SBI]
Here you can solve interesting problems using whatever programming language you like. Also you will earn [SBI](https://steemit.com/@steembasicincome) and sometimes [STEM](https://stemgeeks.net) by doing so.
Also you might learn new things by doing so.
The tasks will be rather hard to solve without a programmable computer and some programming skills, but if you want to add a few million numbers by hand or similar, I would still give you the reward.
*↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓*
# Rules
#### No upvote, No resteem, No follow required!
#### I will give the prize randomly to those who solved the problem.
#### If two pieces of code are to closely related I might consider the later of them as copied which results in no prize for that person.
#### You have 4 days to solve it.
#### Even though this is about computation I will also accept algebraic solutions if you find one.
#### In order to get accepted you need to somehow attach your code.
*↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓*

# Problem
In math there are some functions that cannot be integrated using algebra like this:
![Screenshot from 2019-11-10 23-20-06.png](https://cdn.steemitimages.com/DQmYj3U3P9pmdzdGzCvnrhFt4XMZBLRLoaKjMDHUHCxPijW/Screenshot%20from%202019-11-10%2023-20-06.png)

In cases like that you might need your computer to do that.
You can do that by dividing the function into small almost constant portions and summing them all up.
Use this technique to integrate above function in the interval [1/x, x] where x is your current reputation.

*↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓*

To everyone who already participated in a past contest, come back today and try a new problem(tell me if you don't want to be tagged):
@crokkon @kaeserotor @tonimontana

In case no one gets a result(which I doubt), I will give away the prize to the person who makes the most constructive description why the problem is too hard in your opinion.

*↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓*

@contrabourdon sponsors my contests with 2 STEEM weekly.
You can support him by [using a witness vote on untersatz](https://v2.steemconnect.com/sign/account-witness-vote?witness=untersatz&approve=1), so he can further support this and other contests.
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
👎  
properties (23)
authorquantumdeveloper
permlinkcomputation-contest-4-2-sbi
categoryprogramming
json_metadata{"tags":["programming","puzzle","contest","stem","steembasicincome","sbi","math","steemstem","steemiteducation","palnet"],"users":["crokkon","kaeserotor","tonimontana","contrabourdon"],"image":["https://cdn.steemitimages.com/DQmYj3U3P9pmdzdGzCvnrhFt4XMZBLRLoaKjMDHUHCxPijW/Screenshot%20from%202019-11-10%2023-20-06.png"],"links":["https://steemit.com/@steembasicincome","https://stemgeeks.net","https://v2.steemconnect.com/sign/account-witness-vote?witness=untersatz&approve=1"],"app":"palnet/0.1","format":"markdown","canonical_url":"undefined/@quantumdeveloper/computation-contest-4-2-sbi"}
created2019-11-10 22:25:45
last_update2019-11-10 22:25:45
depth0
children2
last_payout2019-11-17 22:25:45
cashout_time1969-12-31 23:59:59
total_payout_value0.176 HBD
curator_payout_value0.170 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,257
author_reputation4,456,611,502,865
root_title"Computation Contest #4 [2 SBI]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id92,382,476
net_rshares1,759,817,581,955
author_curate_reward""
vote details (45)
@crokkon · (edited)
properties (23)
authorcrokkon
permlinkq0tp63
categoryprogramming
json_metadata"{"app": ""}"
created2019-11-11 21:03:36
last_update2022-09-18 07:29:15
depth1
children0
last_payout2019-11-18 21:03:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1
author_reputation81,214,366,861,104
root_title"Computation Contest #4 [2 SBI]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id92,412,590
net_rshares12,614,542,368
author_curate_reward""
vote details (3)
@kaeserotor ·
![integrate.JPG](https://cdn.steemitimages.com/DQmc53b3ejpLTcVYeAPujBm6u4ooFCYd6yeUdo32cgn9kS5/integrate.JPG)

So the idea here is to approximate the function in some way in small steps. I used rectangles, triangles would be fine too. You calculate the area of each rectangle and sum them all up to get the area under e^(x)/x within the given intervall. I slowly decreased the step size because I wasn't sure how much my PC could handle. 
My reputation is currently 57, and the code gave a result of 1.0156373595307505e+23. This is in good accordance with wolfram alpha (1.015643...e+23), a deviation shows up 5 digits behind the comma. You can improve this with more computation power or time.
👍  ,
properties (23)
authorkaeserotor
permlinkq0s1t0
categoryprogramming
json_metadata{"image":["https://cdn.steemitimages.com/DQmc53b3ejpLTcVYeAPujBm6u4ooFCYd6yeUdo32cgn9kS5/integrate.JPG"],"app":"steemit/0.1"}
created2019-11-10 23:41:18
last_update2019-11-10 23:41:18
depth1
children0
last_payout2019-11-17 23:41:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length694
author_reputation18,015,148,601,358
root_title"Computation Contest #4 [2 SBI]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id92,383,898
net_rshares18,742,581,426
author_curate_reward""
vote details (2)