Community RSS Feed
https://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions in tag Wolfram Language sorted by active[WSG20] Programming Fundamentals Week 3
https://community.wolfram.com/groups/-/m/t/1978662
This week we will be looking at the following topics:
- Monday May 18: Defining Functions - Part I
- Tuesday May 19: Defining Functions - Part II
- Wednesday May 20: Evaluation Control
- Thursday May 21: Entities and Weekly Review Session
- Friday May 22: No study group (Day off at Wolfram)
Please post your questions on this thread and look out for daily challenges.Abrita Chakravarty2020-05-18T12:57:33ZConrad Wolfram's Online Book Launch - The Math(s) Fix
https://community.wolfram.com/groups/-/m/t/1986780
[![enter image description here][1]](https://wolfr.am/MRmTj0WF)
Join Our Virtual Book Launch - **The Math(s) Fix: An Education Blueprint for the AI Age by Author Conrad Wolfram**: https://wolfr.am/MRmQLb6h
[![enter image description here][2]](https://wolfr.am/MRmQLb6h)
Why are we all taught maths for years of our lives? Does it really empower everyone? Or fail most and disenfranchise many? Is it crucial for the AI age or an obsolete rite of passage?
The Math(s) Fix: An Education Blueprint for the AI Age is a groundbreaking book that exposes why maths education is in crisis worldwide and how the only fix is a fundamentally new mainstream subject. It argues that today’s maths education is not working to elevate society with modern computation, data science and AI. Instead, students are subjugated to compete with what computers do best, and lose.
This is the only book to explain why being “bad at maths” may be as much the subject’s fault as the learner’s: how a stuck educational ecosystem has students, parents, teachers, schools, employers and policymakers running in the wrong direction to catch up with real-world requirements. But it goes further too—for the first time setting out a completely alternative vision for a core computational school subject to fix the problem and seed more general reformation of education for the AI age.
Event agenda:
- Introduction
- Conrad Wolfram introduces The Math(s) Fix with book readings
- Interview with Conrad Wolfram
- Live Q&A
- Closing
**Amazon Preorder link:** https://wolfr.am/MRmTj0WF
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=EWNy7MFWkAIyDJi.jpg&userId=1794923
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=join-now-button.png&userId=20103Yaran Liang2020-05-27T13:53:22Z[WSG20] Programming Fundamentals Week 4
https://community.wolfram.com/groups/-/m/t/1985992
This week we will be looking at the following topics:
- Tuesday May 26: Dataset
- Wednesday May 27: Package Development
- Thursday May 28: Workbench
- Friday May 29: Useful Tips and Session Wrap Up
Please post your questions on this thread and look out for daily challenges.Abrita Chakravarty2020-05-26T15:21:32ZHow to solve this mixed partial differential equation in Mathematica.
https://community.wolfram.com/groups/-/m/t/1992710
This is my QS:
![enter image description here][1]
This is my Code:
&[Wolfram Notebook][2]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Mixedpartialdifferentialequation.png&userId=1983492
[2]: https://www.wolframcloud.com/obj/dc65b724-5675-4483-be20-b2baf9591cb5Yuhai Xiang2020-06-01T19:19:58ZDivisible with Select and Replace
https://community.wolfram.com/groups/-/m/t/1991503
Hey everyone! I was trying to use the Divisible function along with the select and Replace function: Select[rn,Divisible[rn,3] ] (rn being a list), but it doesn't give any output. There is output when I do Select[rn, EvenQ] though, so I was confused as to whether Divisible doesn't work with Select or if I was making a syntax or other error? Additionally, on using the Replace function with the select and evenQ
Replace[Select[rn, EvenQ] -> "even"][Select[rn, EvenQ]], the output is simply "even" for the whole list - it doesn't replace the even numbers within the list with "even." I also tried this with Replace[Select[rn, EvenQ] -> "even"][rn] but the output then was the list only. I was wondering if the Replace function works with the individual characters in a list? Any help would be appreciated. Thanks!Aadya Goel2020-05-31T03:45:13ZAvoid WordCloud issues in version 11.3 Home Edition?
https://community.wolfram.com/groups/-/m/t/1325903
I am working the exercises in the Elementary Introduction book, and cannot get the examples of the WordCloud function to work. I get the message"The weight specification used is invalid. At least one weight must be a positive real number. I have tried examples from other sources with the same result. Any ideas?CARL CHILDERS2018-04-23T17:17:44ZTry to beat these MRB constant records!
https://community.wolfram.com/groups/-/m/t/366628
The MRB constant: ALL ABOARD!
-----------------------------
POSTED BY: Marvin Ray Burns.
Autobiographies and his style: [http://marvinrayburns.com/aboutme.html][2]
![CMRB][3]
**C**<sub>*MRB*</sub> is defined below. See http://mathworld.wolfram.com/MRBConstant.html.
**C**<sub>*MRB*</sub>
![equals][4]
![eta diff][7]
![whatseta][8]**.**
![eta sums][9]
was first discovered in 2012 by Richard Crandall of Apple Computer.
The first half is proven below by Gottfried Helms and it is proven more rigorously![(][10]considering the conditionally convergent sum,![enter image description here][11]![)][12] below that. The second half is a Taylor expansion of η(s) around s = 0.
> ![enter image description here][13]
At
[https://math.stackexchange.com/questions/1673886/is-there-a-more-rigorous-way-to-show-these-two-sums-are-exactly-equal][14],
it has been noted that "even though one has cause to be a little bit wary around formal rearrangements of conditionally convergent sums (see the [Riemann series theorem][15]), it's not very difficult to validate the formal manipulation of Helms. The idea is to cordon off a big chunk of the infinite double summation (all the terms from the second column on) that we know is absolutely convergent, which we are then free to rearrange with impunity. (Most relevantly for our purposes here, see pages 80-85 of this [document][16], culminating with the Fubini theorem which is essentially the manipulation Helms is using.)"
> ![argrument 1][17] ![argrument 2][18]
To see integrals for **C**<sub>*MRB*</sub> we use the AbelPlana formula:
> ![AbelPlana][19] ![AbelPlana proof2][20]
This was first applied to **C**<sub>*MRB*</sub> at
[https://math.stackexchange.com/questions/2564705/what-are-some-working-models-that-are-a-fit-the-formula-for-the-mrb-constant/3505694#3505694][21], giving
**C**<sub>*MRB*</sub>
> ![MRB integrals][22]
**C**<sub>*MRB*</sub>![enter image description here][23]
Also, in terms of the EulerRiemann zeta function,
**C**<sub>*MRB*</sub> =![enter image description here][24]
In the light of the parts above, where
**C**<sub>*MRB*</sub>
= ![k^(1/k)-1][25]
= ![eta'(k)][26]
= ![sum from 0][27] ![enter image description here][28]
as well as the previously mentioned ![double equals RHS][29]
an internet scholar going by the moniker "Dark Malthorp" wrote:
> ![enter image description here][30]
![tie][31]
As with any scientific paper, this post contains only reproducible results with methods. These records represent the advancement of consumer-level computers and clever programming over the past 20 years. I see others breaking these records, even after I die!
Map:
----
- First, we have these record number of digits of **C**<sub>*MRB*</sub>
computations.
- Then we have some hints for anyone serious about breaking my record.
- Followed by speed records,
- a program Richard Crandall wrote to check his code for the computing record number of digits
- and a conversation about whether Mathematica uses the same algorithm for computing **C**<sub>*MRB*</sub> by a couple of different methods.
- Then, for a few replies, we compute **C**<sub>*MRB*</sub> from Crandall's eta derivative formulas and see records there.
- There are three replies about "NEW RECORD ATTEMPTS OF 4,000,000 DIGITS!" and the computation is now complete!!!!!.
- We see where I am on a 5,000,000 digit calculation. **(Just recently completed!!!!!!!!!!!!)**
- I describe the MRB supercomputer!!!!!! (faster than some computers with dual platinum Xeon processors) It was used for the 5,000,000 digit calculation.
- Then it comes time for the 6 million digit computation of **C**<sub>*MRB*</sub>. (put on hold, but taken up again at the end)
- We compute **C**<sub>*MRB*</sub> sum via an integral, which certifies the accuracy of **C**<sub>*MRB*</sub> calculations!!!!! (since the sum and integral are vastly different in every way they are computed)
- Finally, we take up the task of calculating 6,000,000 (6 million) digits of **C**<sub>*MRB*</sub> (for the fourth, and now, fifth time!) (will finish Wed 23 Sep 2020 07:29:23)
**MKB constant calculations,**
![enter image description here][32] ,
**have been moved to their discussion at**
[Calculating the digits of the MKB constant][33].
Here are some record computations. If you know of any others let me know.
1. On or about Dec 31, 1998, I computed 1 digit of the (additive inverse of ) **C**<sub>*MRB*</sub> with my TI-92s, by adding 1-sqrt(2)+3^(1/3)-4^(1/4)+... as far as I could. That first digit, by the way, is just 0. Then by using the sum feature, in approximate mode, to compute $\sum _{n=1}^{1000 } (-1)^n \left(n^{1/n}\right),$
I computed the first correct decimal of $\text{CMRB}=\sum _{n=1}^{\infty } (-1)^n \left(n^{1/n}-1\right)$ i.e. (.1). It gave (.1_91323989714) which is close to what Mathematica gives for summing to only an upper limit of 1000.
2. On Jan 11, 1999, I computed 4 decimals(.1878) of **C**<sub>*MRB*</sub> with the Inverse Symbolic Calculator, with the command evalf( 0.1879019633921476926565342538468+sum((-1)^n* (n^(1/n)-1),n=140001..150000)); were 0.1879019633921476926565342538468 was the running total of t=sum((-1)^n* (n^(1/n)-1),n=1..10000), then t= t+the sum from (10001.. 20000), then t=t+the sum from (20001..30000) ... up to t=t+the sum from (130001..140000).
3. In Jan of 1999, I computed 5 correct decimals (rounded to .18786)of **C**<sub>*MRB*</sub> using Mathcad 3.1 on a 50 MHz 80486 IBM 486 personal computer operating on Windows 95.
4. Shortly afterward I tried to compute 9 digits of **C**<sub>*MRB*</sub> using Mathcad 7 professional on the Pentium II mentioned below, by summing (-1)^x x^(1/x) for x=1 to 10,000,000, 20,000,000, and a many more, then linearly approximating the sum to a what a few billion terms would have given.
5. On Jan 23, 1999, I computed 500 digits of **C**<sub>*MRB*</sub> with an online tool called Sigma. Remarkably the sum in 4. was correct to 6 of the 9 decimal places! See
[http://marvinrayburns.com/Original_MRB_Post.html][34]
if you can read the printed and scanned copy there.
6. In September of 1999, I computed the first 5,000 digits of **C**<sub>*MRB*</sub> on a 350 MHz Pentium II with 64 Mb of RAM using the simple PARI commands \p 5000;sumalt(n=1,((-1)^n*(n^(1/n)-1))), after allocating enough memory.
7. On June 10-11, 2003 over a period, of 10 hours, on a 450 MHz P3 with an available 512 MB RAM, I computed 6,995 accurate digits of **C**<sub>*MRB*</sub>.
8. Using a Sony Vaio P4 2.66 GHz laptop computer with 960 MB of available RAM, at 2:04 PM 3/25/2004, I finished computing 8000 digits of **C**<sub>*MRB*</sub>.
9. On March 01, 2006, with a 3 GHz PD with 2 GB RAM available, I computed the first 11,000 digits of **C**<sub>*MRB*</sub>.
10. On Nov 24, 2006, I computed 40, 000 digits of **C**<sub>*MRB*</sub> in 33 hours and 26 min via my program written in Mathematica 5.2. The computation was run on a 32-bit Windows 3 GHz PD desktop computer using 3.25 GB of Ram.
The program was something like this:
Block[{a, b = -1, c = -1 - d, d = (3 + Sqrt[8])^n,
n = 131 Ceiling[40000/100], s = 0}, a[0] = 1;
d = (d + 1/d)/2; For[m = 1, m < n, a[m] = (1 + m)^(1/(1 + m)); m++];
For[k = 0, k < n, c = b - c;
b = b (k + n) (k - n)/((k + 1/2) (k + 1)); s = s + c*a[k]; k++];
N[1/2 - s/d, 40000]]
11. Finishing on July 29, 2007, at 11:57 PM EST, I computed 60,000 digits of **C**<sub>*MRB*</sub>. Computed in 50.51 hours on a 2.6 GHz AMD Athlon with 64 bit Windows XP. Max memory used was 4.0 GB of RAM.
12. Finishing on Aug 3, 2007, at 12:40 AM EST, I computed 65,000 digits of **C**<sub>*MRB*</sub>. Computed in only 50.50 hours on a 2.66 GHz Core 2 Duo using 64 bit Windows XP. Max memory used was 5.0 GB of RAM.
13. Finishing on Aug 12, 2007, at 8:00 PM EST, I computed 100,000 digits of **C**<sub>*MRB*</sub>. They were computed in 170 hours on a 2.66 GHz Core 2 Duo using 64 bit Windows XP. Max memory used was 11.3 GB of RAM. The typical daily record of memory used was 8.5 GB of RAM.
14. Finishing on Sep 23, 2007, at 11:00 AM EST, I computed 150,000 digits of **C**<sub>*MRB*</sub>. They were computed in 330 hours on a 2.66 GHz Core 2 Duo using 64 bit Windows XP. Max memory used was 22 GB of RAM. The typical daily record of memory used was 17 GB of RAM.
15. Finishing on March 16, 2008, at 3:00 PM EST, I computed 200,000 digits of **C**<sub>*MRB*</sub> using Mathematica 5.2. They were computed in 845 hours on a 2.66 GHz Core 2 Duo using 64 bit Windows XP. Max memory used was 47 GB of RAM. The typical daily record of memory used was 28 GB of RAM.
16. Washed away by Hurricane Ike -- on September 13, 2008 sometime between 2:00 PM - 8:00 PM EST an almost complete computation of 300,000 digits of **C**<sub>*MRB*</sub> was destroyed. Computed for a long 4015. Hours (23.899 weeks or 1.4454*10^7 seconds) on a 2.66 GHz Core 2 Duo using 64 bit Windows XP. Max memory used was 91 GB of RAM. The Mathematica 6.0 code used follows:
Block[{$MaxExtraPrecision = 300000 + 8, a, b = -1, c = -1 - d,
d = (3 + Sqrt[8])^n, n = 131 Ceiling[300000/100], s = 0}, a[0] = 1;
d = (d + 1/d)/2; For[m = 1, m < n, a[m] = (1 + m)^(1/(1 + m)); m++];
For[k = 0, k < n, c = b - c;
b = b (k + n) (k - n)/((k + 1/2) (k + 1)); s = s + c*a[k]; k++];
N[1/2 - s/d, 300000]]
17. On September 18, 2008, computation of 225,000 digits of **C**<sub>*MRB*</sub> was started with a 2.66 GHz Core 2 Duo using 64 bit Windows XP. It was completed in 1072 hours. Memory usage is recorded in the attachment pt 225000.xls, near the bottom of this post.
18. 250,000 digits were attempted but failed to be completed to a serious internal error that restarted the machine. The error occurred sometime on December 24, 2008, between 9:00 AM and 9:00 PM. The computation began on November 16, 2008, at 10:03 PM EST. Like the 300,000 digit computation, this one was almost complete when it failed. The Max memory used was 60.5 GB.
19. On Jan 29, 2009, 1:26:19 pm (UTC-0500) EST, I finished computing 250,000 digits of **C**<sub>*MRB*</sub>. with a multiple-step Mathematica command running on a dedicated 64 bit XP using 4 GB DDR2 RAM onboard and 36 GB virtual. The computation took only 333.102 hours. The digits are at http://marvinrayburns.com/250KMRB.txt. The computation is completely documented in the attached 250000.PD at bottom of this post.
20. On Sun 28 Mar 2010 21:44:50 (UTC-0500) EST, I started a computation of 300000 digits of **C**<sub>*MRB*</sub> using an i7 with 8.0 GB of DDR3 RAM onboard, but it failed due to hardware problems.
21. I computed 299,998 Digits of **C**<sub>*MRB*</sub>. The computation began Fri 13 Aug 2010 10:16:20 pm EDT and ended 2.23199*10^6 seconds later |
Wednesday, September 8, 2010. I used Mathematica 6.0 for Microsoft
Windows (64-bit) (June 19, 2007) That is an average of 7.44 seconds per digit. I used my Dell Studio XPS 8100 i7 860 @ 2.80 GHz with 8GB physical DDR3 RAM. Windows 7 reserved an additional 48.929
GB virtual Ram.
22. I computed exactly 300,000 digits to the right of the decimal point
of **C**<sub>*MRB*</sub> from Sat 8 Oct 2011 23:50:40 to Sat 5 Nov 2011
19:53:42 (2.405*10^6 seconds later). This run was 0.5766 seconds per digit slower than the
299,998 digit computation even though it used 16 GB physical DDR3 RAM on the same machine. The working precision and accuracy goal
combination were maximized for exactly 300,000 digits, and the result was automatically saved as a file instead of just being displayed on the front end. Windows reserved a total of 63 GB of working memory of which 52 GB were recorded being used. The 300,000 digits came from the Mathematica 7.0 command
Quit; DateString[]
digits = 300000; str = OpenWrite[]; SetOptions[str,
PageWidth -> 1000]; time = SessionTime[]; Write[str,
NSum[(-1)^n*(n^(1/n) - 1), {n, \[Infinity]},
WorkingPrecision -> digits + 3, AccuracyGoal -> digits,
Method -> "AlternatingSigns"]]; timeused =
SessionTime[] - time; here = Close[str]
DateString[]
23. 314159 digits of the constant took 3 tries due to hardware failure. Finishing on September 18, 2012, I computed 314159 digits, taking 59 GB of RAM. The digits came from the Mathematica 8.0.4 code
DateString[]
NSum[(-1)^n*(n^(1/n) - 1), {n, \[Infinity]},
WorkingPrecision -> 314169, Method -> "AlternatingSigns"] // Timing
DateString[]
24. Sam Noble of Apple computed 1,000,000 digits of **C**<sub>*MRB*</sub> in 18 days 9 hours 11 minutes 34.253417 seconds.
25. Finishing on Dec 11, 2012, Richard Crandall, an Apple scientist, computed 1,048,576 digits
in a lightning-fast 76.4 hours computation time (from the timing command). That's on a 2.93 GHz 8-core Nehalem. In Aug of 2018, I computed 1,004,993 digits of **C**<sub>*MRB*</sub> in 53.5 hours with 10 DDR4 RAM (of up to 3000 MHz) supported processor cores overclocked up to 4.7 GHz! Search this post for "53.5" for documentation. Sept 21, 2018: I computed 1,004,993 digits of **C**<sub>*MRB*</sub> in 50.37 hours of absolute time (35.4 hours computation time) with 18 (DDR3 and DDR4) processor cores! Search this post for "50.37 hours" for documentation.** Finally, now, May 11, 2019, I computed over 1,004,993 digits, using 28 kernels on 18 DDR4 RAM (of up to 3200 MHz) supported cores overclocked up to 5.1 GHz in 45,5 hours of absolute time and only 32.5 hours of computation time! Search 'Documented in the attached ":3 fastest computers together 3.nb." ' for the post that has the attached documenting notebook.
26. I computed a little over 1,200,000 digits of **C**<sub>*MRB*</sub> in 11
days, 21 hours, 17 minutes, and 41 seconds (finishing on March 31, 2013). I used a six-core Intel(R) Core(TM) i7-3930K CPU @ 3.20 GHz 3.20 GHz.
27. On May 17, 2013, I finished a 2,000,000 or more digit computation of **C**<sub>*MRB*</sub>, using only around 10GB of RAM. It took 37 days 5 hours 6 minutes 47.1870579 seconds. I used my six-core Intel(R) Core(TM) i7-3930K CPU @ 3.20 GHz 3.20 GHz.
28. A previous world record computation of **C**<sub>*MRB*</sub> was finished on Sun 21 Sep 2014 at 18:35:06. It took 1 month 27 days 2 hours 45 minutes 15 seconds. The processor time from the 3,000,000+ digit computation was 22 days. I computed the 3,014,991 digits of **C**<sub>*MRB*</sub> with Mathematica 10.0. I Used my new version of Richard Crandall's code in the attached 3M.nb, optimized for my platform and large computations. I also used a six-core Intel(R) Core(TM) i7-3930K CPU @ 3.20 GHz with 64 GB of RAM of which only 16 GB was used. Can you beat it (in more number of digits, less memory used, or less time taken)? This confirms that my previous "2,000,000 or more digit computation" was accurate to 2,009,993 digits. they were used to check the first several digits of this computation. See attached 3M.nb for the full code and digits.
29. Finished on Wed 16 Jan 2019 19:55:20, I computed over 4 million digits of **C**<sub>*MRB*</sub>.
It took 4 years of continuous tries. This successful run took 65.13 days computation time, with a processor time of 25.17 days, on a 3.7 GHz overclocked up to 4.7 GHz on all cores Intel 6 core computer with 3000 MHz RAM. According to this computation, the previous record, 3,000,000+ digit computation, was accurate to 3,014,871 decimals, as this computation used my algorithm for computing n^(1/n) as found at chapter 3 in the paper at
https://www.sciencedirect.com/science/article/pii/0898122189900242
and the 3 million+ computation used Crandall's algorithm. Both algorithms outperform Newton's method per calculation and iteration.
See attached [notebook][35].
M R Burns' algorithm:
x = SetPrecision[x, pr];
y = x^n; z = (n - y)/y;
t = 2 n - 1; t2 = t^2;
x =
x*(1 + SetPrecision[4.5, pr] (n - 1)/t2 + (n + 1) z/(2 n t) -
SetPrecision[13.5, pr] n (n - 1) 1/(3 n t2 + t^3 z));
(*N[Exp[Log[n]/n],pr]*)
Example:
ClearSystemCache[]; n = 123456789;
(*n is the n in n^(1/n)*)
x = N[n^(1/n),100];
(*x starts out as a relatively small precision approximation to n^(1/n)*)
pc = Precision[x]; pr = 10000000;
(*pr is the desired precision of your n^(1/n)*)
Print[t0 = Timing[While[pc < pr, pc = Min[4 pc, pr];
x = SetPrecision[x, pc];
y = x^n; z = (n - y)/y;
t = 2 n - 1; t2 = t^2;
x = x*(1 + SetPrecision[4.5, pc] (n - 1)/t2 + (n + 1) z/(2 n t)
- SetPrecision[13.5, pc] n (n - 1)/(3 n t2 + t^3 z))];
(*You get a much faster version of N[n^(1/n),pr]*)
N[n - x^n, 10]](*The error*)];
ClearSystemCache[]; n = 123456789; Print[t1 = Timing[N[n - N[n^(1/n), pr]^n, 10]]]
Gives
{25.5469,0.*10^-9999984}
{101.359,0.*10^-9999984}
R Crandall's algorithm:
While[pc < pr, pc = Min[3 pc, pr];
x = SetPrecision[x, pc];
y = x^n - n;
x = x (1 - 2 y/((n + 1) y + 2 n n));];
(*N[Exp[Log[n]/ n],pr]*)
Example:
ClearSystemCache[]; n = 123456789;
(*n is the n in n^(1/n)*)
x = N[n^(1/n)];
(*x starts out as a machine precision approximation to n^(1/n)*)
pc = Precision[x]; pr = 10000000;
(*pr is the desired precision of your n^(1/n)*)
Print[t0 = Timing[While[pc < pr, pc = Min[3 pc, pr];
x = SetPrecision[x, pc];
y = x^n - n;
x = x (1 - 2 y/((n + 1) y + 2 n n));];
(*N[Exp[Log[n]/n],pr]*)
N[n - x^n, 10]](* The error*)]; Print[
t1 = Timing[N[n - N[n^(1/n), pr]^n, 10]]]
Gives
{32.1406,0.*10^-9999984}
{104.516,0.*10^-9999984}
More information available upon request.
30. Finished on Fri 19 Jul 2019 18:49:02, I computed over 5 million digits of **C**<sub>*MRB*</sub>.
Methods described in the reply below that starts with
"
Attempts at a 5,000,000 digit calculation
."
Here is my mini-cluster of the fastest 3 computers mentioned below:
The one to the left is my custom-built extreme edition 6 core and later with an 8 core Xeon processor.
The one in the center is my fast little 4 core Asus with 2400 MHz RAM.
Then the one on the right is my fastest -- a Digital Storm 6 core overclocked to 4.7 GHz on all cores and with 3000 MHz RAM.
![enter image description here][36]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=91388990_3324757394204593_153548954892500992_o.jpg&userId=366611
[2]: http://marvinrayburns.com/aboutme.html
[3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=1ac.JPG&userId=366611
[4]: https://community.wolfram.com//c/portal/getImageAttachment?filename=10514Capture5.JPG&userId=366611
[5]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Capture17.JPG&userId=366611
[6]: https://community.wolfram.com//c/portal/getImageAttachment?filename=3593Capture16.JPG&userId=366611
[7]: https://community.wolfram.com//c/portal/getImageAttachment?filename=8964Capture10.JPG&userId=366611
[8]: https://community.wolfram.com//c/portal/getImageAttachment?filename=whatseta.JPG&userId=366611
[9]: https://community.wolfram.com//c/portal/getImageAttachment?filename=2081Capture14.JPG&userId=366611
[10]: https://community.wolfram.com//c/portal/getImageAttachment?filename=left.gif&userId=366611
[11]: https://community.wolfram.com//c/portal/getImageAttachment?filename=3959Capture7.JPG&userId=366611
[12]: https://community.wolfram.com//c/portal/getImageAttachment?filename=right.gif&userId=366611
[13]: https://community.wolfram.com//c/portal/getImageAttachment?filename=10297Capture.JPG&userId=366611
[14]: https://math.stackexchange.com/questions/1673886/is-there-a-more-rigorous-way-to-show-these-two-sums-are-exactly-equal
[15]: https://en.wikipedia.org/wiki/Riemann_series_theorem
[16]: https://www.math.ucdavis.edu/~hunter/intro_analysis_pdf/ch4.pdf
[17]: https://community.wolfram.com//c/portal/getImageAttachment?filename=7211Capture.JPG&userId=366611
[18]: https://community.wolfram.com//c/portal/getImageAttachment?filename=10837Capture.JPG&userId=366611
[19]: https://community.wolfram.com//c/portal/getImageAttachment?filename=proof1.JPG&userId=366611
[20]: https://community.wolfram.com//c/portal/getImageAttachment?filename=proof2.JPG&userId=366611
[21]: https://math.stackexchange.com/questions/2564705/what-are-some-working-models-that-are-a-fit-the-formula-for-the-mrb-constant/3505694#3505694
[22]: https://community.wolfram.com//c/portal/getImageAttachment?filename=798811g.JPG&userId=366611
[23]: https://community.wolfram.com//c/portal/getImageAttachment?filename=9371CapturemI2.JPG&userId=366611
[24]: https://community.wolfram.com//c/portal/getImageAttachment?filename=11i.JPG&userId=366611
[25]: https://community.wolfram.com//c/portal/getImageAttachment?filename=11ka.JPG&userId=366611
[26]: https://community.wolfram.com//c/portal/getImageAttachment?filename=84481.JPG&userId=366611
[27]: https://community.wolfram.com//c/portal/getImageAttachment?filename=1869Capture.JPG&userId=366611
[28]: https://community.wolfram.com//c/portal/getImageAttachment?filename=6878p1o2.jpg&userId=366611
[29]: https://community.wolfram.com//c/portal/getImageAttachment?filename=5630Capture2.JPG&userId=366611
[30]: https://community.wolfram.com//c/portal/getImageAttachment?filename=11k.JPG&userId=366611
[31]: https://community.wolfram.com//c/portal/getImageAttachment?filename=4861Capture3.JPG&userId=366611
[32]: http://community.wolfram.com//c/portal/getImageAttachment?filename=5860Capturemkb.JPG&userId=366611
[33]: http://community.wolfram.com/groups/-/m/t/1323951?p_p_auth=W3TxvEwH
[34]: http://marvinrayburns.com/Original_MRB_Post.html
[35]: https://community.wolfram.com/groups?p_auth=zWk1Qjoj&p_p_auth=r1gPncLu&p_p_id=19&p_p_lifecycle=1&p_p_state=exclusive&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=6&_19_struts_action=/message_boards/get_message_attachment&_19_messageId=1593151&_19_attachment=4%20million%2011%202018.nb
[36]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ezgif.com-video-to-gif.gif&userId=366611Marvin Ray Burns2014-10-09T18:08:49ZSimplify expectation/integral over PDF
https://community.wolfram.com/groups/-/m/t/1992596
Integrating over x on a Normal-PDF, I expect the answer to simplify to mu.
However, this does not seems to work:
FullSimplify[Integrate[(1/(s*Sqrt[2*Pi]))*exp[-0.5*(((x-m)/s)^2)], x], s \[Element] Reals \[And]s>0\[And]x\[Element] Reals\[And] m \[Element] Reals]
What am I forgetting?
(for convenience: mu is abbreviated m, sigma is abbreviated s)Nino Hardt2020-06-01T17:21:01ZDay of FindDivisions
https://community.wolfram.com/groups/-/m/t/1991943
&[WolframNotebook][1]
[1]: https://www.wolframcloud.com/obj/wyelen/Published/Day%20of%20FindDivisions%20--%20A%20Kandinskys%20taste%20ver.4.nbSilvia Hao2020-06-01T03:43:26ZHow to add a column of a list of values to a dataset?
https://community.wolfram.com/groups/-/m/t/1991918
How can I add a column into my data set. This is the data set:
dt = Dataset@
{
<|"col1" -> 2, "col2" -> 23, "col3" -> 12|>,
<|"col1" -> 3, "col2" -> 30, "col3" -> 13|>,
<|"col1" -> 5, "col2" -> 33, "col3" -> 15|>,
<|"col1" -> 34, "col2" -> 53, "col3" -> 11|>,
<|"col1" -> 43, "col2" -> 45, "col3" -> 9|>,
<|"col1" -> 11, "col2" -> 24, "col3" -> 7|>
}
I have been trying using `dt[All, Prepend["col4" -> 1]]` but this adds a column with the same values, And I am trying to add a list of values as a column like `col4 = {1,34,65,76,8,66}`. Any thoughts?Jalil Villalobos2020-05-31T22:54:43ZUse LinearModelFit for 2D fitting?
https://community.wolfram.com/groups/-/m/t/1942443
Hello,
Is there any way to use LinearModelFit command to fit bivariate functions (e.g. bivariate polynomials) to discrete 2D data? If yes, I would appreciate some examples or guidance. Or maybe MATHEMATICA has some alternative method for such fitting?
LesławLeslaw Bieniasz2020-04-17T12:05:48ZV12 gives the wrong integral
https://community.wolfram.com/groups/-/m/t/1992079
Integrate[q2^eps Log(q2+m2) (q2+m2)^-1,{q2,0,Infinity}]
gives
0, if -1<Re[eps]<0 && Re[m2]>0
which is wrong.
If ones adds
Assumptions -> {m2 > 0, -1 < eps < 0}
then it is correct.santiago peris2020-06-01T07:55:38ZA doubt about SubsetCases
https://community.wolfram.com/groups/-/m/t/1991810
Hello all. Version 12.1 has several very useful functions. SubsetCases seems to be one of them. However, I have a doubt regarding its use. It comes from an example from the documentation:
SubsetCases[{1, 2, 3, a, a, b, c}, {a, _Integer}]
This returns {{a,1},{a,2}}. Why not {a,3}? Indeed it has an overlap with the previous two lists, but the chosen output also has the same overlap (that is, the symbol a}
If indeed overlaps are turned to true {a,3} and much more is included.
But if the overlaps are omitted, why does the code return {a,2} and not {a,3}?
Any clarification is welcomed.
FranciscoFrancisco Gutierrez2020-05-31T19:59:34ZIs there a built-in function to import Esri ASCII raster format?
https://community.wolfram.com/groups/-/m/t/1992138
Does anyone know whether Mathematica has a built-in function to import **Esri ASCII raster format** data as described at [Esri ASCII raster format][1].
I haven't been able to find any mention in the documentation, but thought I'd check here before penning my own function.
Any help would be much appreciated.
[1]: http://resources.arcgis.com/en/help/main/10.2/index.html#/Esri_ASCII_raster_format/009t0000000z000000/Ian Williams2020-06-01T09:06:26ZFrobenius 21 Group
https://community.wolfram.com/groups/-/m/t/1990153
FiniteGroupData is missing a few group generations, so I've filled in some holes. One of the groups is Frobenius 21.
F21=PermutationGroup[{Cycles[{{1,2,3,4,5,6,7},{8,9,10,11,12,13,14},{15,16,17,18,19,20,21}}],Cycles[{{1,7,6,5,4,3,2},{8,14,13,12,11,10,9},{15,21,20,19,18,17,16}}],Cycles[{{1,8,15},{2,12,17},{3,9,19},{4,13,21},{5,10,16},{6,14,18},{7,11,20}}],Cycles[{{1,15,8},{2,17,12},{3,19,9},{4,21,13},{5,16,10},{6,18,14},{7,20,11}}]}];
Then I looked at the Cayley graph.
z =Graph3D[CayleyGraph[F21]]
![Frobenius 21][1]
I decided to check if it was in GraphData. Turns out it is.
IsomorphicGraphQ[GraphData[{"UnitDistance",{21,2}}], Graph[UndirectedEdge@@@Union[Sort/@List@@@EdgeList[z]]]]
Which graph is this? Turns out this is *my* graph, a unit distance graph with chromatic number 4 and no 4-cycles.
GraphData[{"UnitDistance", {21, 2}}]
![twisted 7][2]
When I found the graph I had no idea it would pop up somewhere else.
In the notebook I also have some missing groups for orders 16, 18, 20, 21, 24 and 27. Does anyone want the missing groups for order 32?
One of the 24 groups gives the Nauru graph.
![enter image description here][3]
&[Wolfram Notebook][4]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Frob21.png&userId=21530
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=twisted7.png&userId=21530
[3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Nauru.png&userId=21530
[4]: https://www.wolframcloud.com/obj/wolfram-community/Published/Frob21.nbEd Pegg2020-05-29T14:39:51Z[?] Use Except in a RegularExpression?
https://community.wolfram.com/groups/-/m/t/1392816
Friends:
Can Except be used in Regular Expressions? And then how?
This is potentially quite useful.
Suppose I want to match a pattern with the class character [A-Z] but without the class character [B-D].
This seems to be a job for combined regular expressions and Except...But then how to do it?
Any help is welcome,
FranciscoFrancisco Gutierrez2018-07-26T16:32:39ZPlotting Voronoi diagram for a country
https://community.wolfram.com/groups/-/m/t/1975264
Dear all,
I have geographical coordinates and rainfall values for 151 points (stations) over Turkey.
How do I plot the Voronoi diagram over this country with Mathematica?
Sations = {"ADANABOLGE", "ADIYAMAN", "AFYONKARAHİSARBÖLGE", "AĞRI",
"AHLAT", "AKÇAABAT", "AKÇAKOCA", "AKSARAY", "AKŞEHİR", "AMASRA",
"AMASYA", "ANKARABÖLGE", "ARDAHAN", "ARTVİN", "AYVALIK", "BAFRA",
"BALIKESİRGÖNEN", "BANDIRMA", "BARTIN", "BAŞKALE", "BAYBURT",
"BERGAMA", "BEYPAZARI", "BEYŞEHİR", "BİLECİK", "BİNGÖL",
"BOĞAZLIYAN", "BOLU", "BOLVADİN", "BOZÜYÜK", "BURDUR", "BURSA",
"ÇANAKKALE", "ÇANKIRI", "ÇEMİŞGEZEK", "CEYHAN", "CİHANBEYLİ",
"ÇORLU", "ÇORUM", "DENİZLİ", "DEVELİ", "DİNAR", "DİVRİĞİ",
"DİYARBAKIRHAVALİMANI", "DÖRTYOL", "DURSUNBEY", "DÜZCE", "EDİRNE",
"EĞİRDİR", "ELAZIĞBÖLGE", "ELMALI", "EMİRDAĞ", "ERCİŞ", "ERDEMLİ",
"EREĞLİ", "ERZİNCAN", "ERZURUMHAVALİMANI", "FLORYA", "GAZİANTEP",
"GEMEREK", "GEYVE", "GİRESUN", "GÖKÇEADA", "GÖKSUN", "GÜMÜŞHANE",
"GÜNEY", "HADİM", "HINIS", "HOPA", "HORASAN", "IĞDIR", "ILGIN",
"İNEBOLU", "İSKENDERUN", "ISPARTA", "İSPİR", "İZMİRBÖLGE",
"KAHRAMANMARAŞ", "KARAİSALI", "KARAMAN", "KARAPINAR", "KARS",
"KASTAMONU", "KASTAMONUBOZKURT", "KAYSERİBÖLGE", "KEBAN", "KELES",
"KİLİS", "KIRKLARELİ", "KIRŞEHİR", "KIZILCAHAMAM", "KOCAELİ",
"KONYAHAVALİMANI", "KORKUTELİ", "KOZAN", "KULU", "KÜTAHYA",
"MALATYA", "MALAZGİRT", "MANAVGAT", "MERZİFON", "MUĞLA", "MUŞ",
"NALLIHAN", "NEVŞEHİR", "NİĞDE", "ORDU", "ÖZALP", "PALU",
"POLATLI", "RİZE", "RİZEPAZAR", "SAKARYA", "SALİHLİ", "SAMANDAĞ",
"SAMSUNBÖLGE", "SARIKAMIŞ", "SARIYER", "SARIYERKUMKÖYKİLYOS",
"SARIZ", "ŞEBİNKARAHİSAR", "SENİRKENT", "SEYDİŞEHİR", "SİİRT",
"ŞİLE", "SİMAV", "SİNOP", "SİVAS", "SIVRIHISAR", "SOLHAN",
"TAVŞANLI", "TEFENNİ", "TEKİRDAĞ", "TERCAN", "TOKAT", "TORTUM",
"TOSYA", "TUNCELİ", "ULUBORLU", "ULUDAĞ", "UŞAK", "UZUNKÖPRÜ",
"VANBÖLGE", "YALOVA", "YATAĞAN", "YOZGAT", "YUMURTALIK", "YUNAK",
"ZARA", "ZİLE", "ZONGULDAK"};
lat = {37.`, 37.75`, 38.75`, 39.72`, 38.77`, 41.02`, 41.08`, 38.38`,
38.35`, 41.75`, 40.65`, 39.95`, 41.12`, 41.18`, 39.32`, 41.57`,
40.1`, 40.35`, 41.63`, 38.05`, 40.25`, 39.12`, 40.17`, 37.68`,
40.15`, 38.88`, 39.2`, 40.73`, 38.72`, 39.92`, 37.72`, 40.18`,
40.15`, 40.6`, 39.07`, 37.03`, 38.65`, 41.17`, 40.55`, 37.78`,
38.38`, 38.07`, 39.37`, 37.9`, 36.85`, 39.58`, 40.83`, 41.67`,
37.87`, 38.67`, 36.75`, 39.02`, 39.03`, 36.62`, 37.5`, 39.75`,
39.92`, 40.98`, 37.07`, 39.18`, 40.52`, 40.92`, 40.2`, 38.02`,
40.47`, 38.15`, 36.98`, 39.37`, 41.4`, 40.05`, 39.92`, 38.28`,
41.98`, 36.58`, 37.77`, 40.48`, 38.43`, 37.6`, 37.27`, 37.18`,
37.72`, 40.62`, 41.37`, 41.95`, 38.73`, 38.8`, 39.92`, 36.72`,
41.73`, 39.15`, 40.47`, 40.78`, 37.87`, 36.75`, 37.45`, 39.1`,
39.42`, 38.35`, 39.15`, 36.78`, 40.87`, 37.22`, 38.73`, 40.18`,
38.58`, 37.97`, 40.98`, 38.67`, 38.72`, 39.58`, 41.03`, 41.18`,
40.78`, 38.48`, 36.08`, 41.28`, 40.33`, 41.17, 41.25`, 38.48`,
40.3`, 38.1`, 37.42`, 37.92`, 41.18`, 39.08`, 42.02`, 39.75`,
39.45`, 38.97`, 39.55`, 37.32`, 40.98`, 39.78`, 40.3`, 40.3`,
41.02`, 39.12`, 38.08`, 40.13`, 38.68`, 41.27`, 38.5`, 40.65`,
37.35`, 39.82`, 36.77`, 38.82`, 39.9`, 40.3`, 41.45`};
lon = {35.33`, 38.28`, 30.53`, 43.05`, 42.5`, 39.58`, 31.13`, 34.08`,
31.42`, 32.38`, 35.83`, 32.88`, 42.72`, 41.82`, 26.7`, 35.92`,
27.65`, 27.97`, 32.33`, 44.02`, 40.23`, 27.18`, 31.92`, 31.72`,
29.98`, 40.48`, 35.25`, 31.52`, 31.05`, 30.03`, 30.28`, 29.07`,
26.42`, 33.62`, 38.92`, 35.82`, 32.93`, 27.8`, 34.95`, 29.08`,
35.5`, 30.17`, 38.12`, 40.23`, 36.22`, 28.63`, 31.17`, 26.57`,
30.83`, 39.23`, 29.92`, 31.15`, 43.35`, 34.3`, 34.05`, 39.5`,
41.27`, 28.75`, 37.38`, 36.07`, 30.3`, 38.4`, 25.9`, 36.5`, 39.47`,
29.07`, 32.47`, 41.7`, 41.43`, 42.17`, 44.05`, 31.92`, 33.77`,
36.17`, 30.55`, 41.`, 27.17`, 36.93`, 35.07`, 33.22`, 33.55`,
43.1`, 33.78`, 34.02`, 35.48`, 38.75`, 29.07`, 37.12`, 27.23`,
34.17`, 32.65`, 29.93`, 32.48`, 30.2`, 35.82`, 33.`, 29.97`,
38.32`, 42.53`, 31.43`, 35.33`, 28.37`, 41.48`, 31.35`, 34.67`,
34.68`, 37.9`, 43.98`, 39.97`, 32.15`, 40.52`, 40.88`, 30.42`,
28.13`, 35.97`, 36.3`, 42.57`, 29.05, 29.03`, 36.5`, 38.42`,
30.55`, 31.83`, 41.95`, 29.61`, 28.98`, 35.17`, 37.02`, 31.53`,
41.07`, 29.5`, 29.77`, 27.55`, 40.38`, 36.57`, 41.55`, 34.03`,
39.55`, 30.45`, 29.08`, 29.4`, 26.68`, 43.38`, 29.27`, 28.13`,
34.8`, 35.78`, 31.73`, 37.75`, 35.75`, 31.8`};
rain = {65.10364583333333`, 69.24427083333333`, 35.316875`,
44.31385416666667`, 48.824375`, 60.07927083333334`,
90.26499999999999`, 30.4459375`, 47.152499999999996`,
84.07041666666667`, 39.665104166666666`, 33.730937499999996`,
46.18989583333334`, 59.59437500000001`, 65.39645833333333`,
66.26520833333333`, 56.8996875`, 60.803437499999994`,
86.75604166666668`, 37.60124999999999`, 37.283229166666665`,
62.348958333333336`, 34.07760416666667`, 42.45520833333334`,
37.88489583333333`, 83.88291666666665`, 33.40291666666666`,
46.26270833333333`, 33.0103125`, 40.45520833333333`,
35.920833333333334`, 59.19114583333333`, 54.93541666666667`,
33.924166666666665`, 54.429999999999986`, 68.190625`,
28.725729166666664`, 48.099687499999995`, 38.19916666666666`,
50.333125`, 33.5215625`, 38.09729166666667`, 33.66562499999999`,
47.78999999999999`, 80.06635416666668`, 47.6740625`, 68.9203125`,
49.01083333333332`, 70.82197916666667`, 36.59572916666666`,
42.33979166666666`, 34.72958333333332`, 37.396875`,
61.012187499999996`, 27.422604166666662`, 31.66`, 34.3028125`,
54.60708333333333`, 59.14447916666666`, 36.41260416666667`,
53.246249999999996`, 104.93041666666666`, 64.91343749999999`,
54.14729166666666`, 38.96833333333334`, 48.09666666666667`,
58.42135416666667`, 50.02572916666667`, 186.38958333333332`,
34.09375`, 21.917500000000004`, 36.49583333333333`,
84.91864583333333`, 63.12968749999999`, 43.601875`,
39.66906250000001`, 74.27645833333334`, 75.86124999999998`,
78.48114583333333`, 30.548333333333332`, 27.080729166666668`,
40.853541666666665`, 41.176770833333336`, 102.25729166666665`,
34.189791666666665`, 33.369791666666664`, 62.652604166666656`,
53.38614583333333`, 46.46583333333333`, 33.14489583333333`,
47.733333333333334`, 68.51447916666666`, 27.64041666666667`,
33.63822916666667`, 72.35229166666667`, 33.57364583333333`,
45.55354166666667`, 34.13260416666666`, 39.54677083333333`,
129.77604166666666`, 37.36052083333333`, 109.60208333333331`,
67.33604166666666`, 28.4934375`, 36.56010416666666`,
28.66677083333333`, 86.56166666666665`, 41.82364583333333`,
50.02427083333333`, 30.500416666666666`, 186.503125`,
170.72708333333335`, 70.54874999999998`, 46.05270833333334`,
89.77739583333333`, 57.81166666666666`, 51.84885416666666`,
70.90697916666667`, 70.74885416666667`, 46.635833333333345`,
50.375104166666674`, 56.90666666666666`, 63.61427083333333`,
65.45572916666667`, 73.02739583333334`, 69.20229166666667`,
56.49010416666667`, 38.18552083333333`, 33.69833333333334`,
59.517916666666665`, 40.5925`, 39.89760416666666`, 49.4359375`,
37.839166666666664`, 37.82166666666667`, 40.09354166666666`,
39.73760416666667`, 75.17218749999999`, 52.24187499999999`,
123.11343749999999`, 47.08375`, 55.36291666666667`,
34.23145833333333`, 62.806562500000005`, 62.40125`, 52.1103125`,
80.3328125`, 38.78125`, 45.807291666666664`, 39.19291666666667`,
102.12302083333334`};
latLngs = Transpose[{lat, lon}];
toMercator[{lat_, lng_}] := {lng,
Log[Abs[Sec[lat*Degree] + Tan[lat*Degree]]]/Degree};
mercPoints = toMercator /@ latLngs;
Show[CountryData["Turkey", {"Shape", "Mercator"}], Frame -> True,
Epilog -> {PointSize[0.01], Red, Point[mercPoints]}]
![enter image description here][1]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=4089Untitled.png&userId=943918M.A. Ghorbani2020-05-15T07:30:13Z[WSG20] Programming Fundamentals Week 2
https://community.wolfram.com/groups/-/m/t/1970834
This week we will be looking at the following topics:
- Monday May 11: Expressions and Assignments
- Tuesday May 12: Iterations, Counting and Lists
- Wednesday May 13: Patterns
- Thursday May 14: Flow Control, Pure Functions and Scoping
- Friday May 15: Review of topics from this week
Please post your questions on this thread and look out for daily challenges.Abrita Chakravarty2020-05-11T15:27:47ZMeta-programming in Wolfram Language: implementing R's dplyr
https://community.wolfram.com/groups/-/m/t/1901462
&[Wolfram Notebook][1]
[1]: https://www.wolframcloud.com/obj/vkryukov/Published/dplyr.nbVictor K2020-03-18T22:46:01ZSpeed up this series expansion?
https://community.wolfram.com/groups/-/m/t/1859268
Hi,
I wonder why the following commands:
Fun1[s_] := (1 - BesselK[0, Sqrt[s + gam]]/BesselK[1, Sqrt[s + gam]])/(s*Sqrt[s + gam]);
ser1 = Series[Fun1[s], {s, ?, 60}];
are still not completed after a day of calculations on a supercomputer?
Is there any way to speed up the computations?
LeslawLeslaw Bieniasz2020-01-14T09:08:55ZHas anyone encountered problems retrieving financial data of ETF like "SPY"
https://community.wolfram.com/groups/-/m/t/1780562
I have been trying to retrieve pricing of ETFs and always the output is Missing["NotAvailable"] which is information that FinancialData used to have.Eduardo Pollak2019-08-31T18:39:34ZLimit of a sum of functions with conditions on the limits of each
https://community.wolfram.com/groups/-/m/t/1987725
Hello
My attention was drawn to a twitter post [analysis][1] that I do not know how to convey in Mathematica code: limits for `f[x]` and `f'[x] are to be found and not explicitly defined..
My approach so far:
Assuming[a \[Element] Reals &&
Limit[#1 + #2 & @@ {f[x], f'[x]}, x -> \[Infinity]] == a , {Limit[
f[x], ?exp], Limit[f'[x],?exp]}
leads me to nowhere. What is the code to be inserted instead of ?exp.
I doubt very much that Mathematica can verify this remarkable proof by Hardy, but certainly find a set of functions for which this proof holds. How can it be done ? Thanks.
[1]: https://twitter.com/AnalysisFact/status/1253351706164891656jan potocki2020-05-28T12:42:24ZFor Compile, when specificying option values do NOT improve performance?
https://community.wolfram.com/groups/-/m/t/1989998
When I use the function Compile and set CompilationTarget->"C",Parallelization -> True, It does NOT run faster than I do not set CompilationTarget and Parallelization, and without error information. What may cause that? I do have CCompiler（Microsoft Visual Studio） and 6 kernels.
![What document shows][1]
What document shows
![What result I actually run][2]
What result I actually run
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=mathematica1.jpg&userId=1981027
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=mathematica2.jpg&userId=1981027Haobo Xia2020-05-29T17:09:28Z[WSS19] Creating Interactive Macroeconomic Models
https://community.wolfram.com/groups/-/m/t/1730046
Introduction
============
This project is to create a series of interactive macroeconomic models using Mathematica. The underlying motive is to help many instructors in the college level economics courses motivate and engage their students with some advanced computational technology.
As a starter, I build and replicate the Keynesian aggregate demand model (with some varying specifications) that we can use in the classroom to demonstrate some dynamic features of the model.
Building a simple Keynesian AD model
====================================
- Model specification
The mathematical structure of the Keynesian AD model is quite simple. Let us suppose that the aggregate demand ("AD") in our simple model economy consists of household consumption expenditure ("C") and private business investment spending ("PBI"), and that the household consumption expenditure can be further decomposed into two parts, one autonomous part of consumption("Subscript[c, 0]") and the other variable part of consumption.
If we assume that there is a statistically significant and stable correlation between households' average consumption spending habit ("Subscript[c, 1]") and their income ("Y"), then the variable part of consumption becomes a function of households' income ("Subscript[c, 1]Y "). Based upon this reasoning, we can hypothesize the following behavioral equation that constitutes the aggregate demand, that is,
AD=Subscript[c, 0]+Subscript[c, 1]Y+PBI
Solve[Y ==Subscript[c, 0]+Subscript[c, 1]Y+PBI,Y]
- Interactive AD Model
The syntax for creating an interactive model is as follow:
Manipulate[
Row[{Plot[{c0+c1*Y +PBI,Y} ,{Y,0,10000},GridLines->Automatic,AxesLabel->{"Output-Income","Aggregate Demand"},PlotStyle->{Red,Blue},LabelStyle->Directive[Black,Bold], Filling->Bottom,PlotLabel->"Keynesian AD demand model I",ImageSize->500],
Column[{
Style["Subscript[c, 0] = "<>ToString[c0],FontFamily->"Helvetica"],
Style["Subscript[c, 1] = "<>ToString[c1],FontFamily->"Helvetica"],
Style[ "PBI = "<>ToString[PBI],FontFamily->"Helvetica"]
}]}],
{c0,100,1000,50},Item["autonomous consumption",Alignment->Center],
{c1,0.5,0.9,0.05},Item["marginal propensity to consume",Alignment->Center],
{PBI,500,1000,100},Item["private business investment",Alignment->Center],SaveDefinitions->True]
![The baseline AD model with some interactive features][1]
Extending the baseline Keynesian AD model with the government sector
========================================================================
- Model specification
If government is present and if it adopts a particular tax policy that is a combination of the lump-sum tax ("Subscript[t, 0]") and marginal tax rate ("Subscript[t, 1]"), the household consumption expenditure and the aggregate demand needs to be modified:
AD=Subscript[c, 0]+Subscript[c, 1]*(Y-t0-t1 Y+TR)+PBI +G
Solve[Subscript[c, 0]+Subscript[c, 1]*(Y-t0-t1 Y+TR)+PBI+G==Y,Y]
- Interactive model
Manipulate[
Row[{Plot[{c0+c1*(Y-t0-t1 Y+TR) +PBI+G,Y} ,{Y,0,10000},GridLines->Automatic,AxesLabel->{"Output-Income","Aggregate Demand"},PlotStyle->{Red,Blue},LabelStyle->Directive[Black,Bold], Filling->Bottom,PlotLabel->"Keynesian AD demand model IV: Y^*=1/(1-c1(1-t))*[c0-c1*t0+c1*TR+PBI+G]",ImageSize->500],
Column[{
Style["Subscript[c, 0] = "<>ToString[c0],FontFamily->"Helvetica"],
Style["Subscript[c, 1] = "<>ToString[c1],FontFamily->"Helvetica"],
Style[ "PBI = "<>ToString[PBI],FontFamily->"Helvetica"],
Style[ "G = "<>ToString[G],FontFamily->"Helvetica"],
Style[ "Subscript[t, 0] = "<>ToString[t0],FontFamily->"Helvetica"],
Style[ "Subscript[t, 1] = "<>ToString[t1],FontFamily->"Helvetica"],
Style[ "TR = "<>ToString[TR],FontFamily->"Helvetica"]
}]}],
{c0,100,500,50},Item["autonomous consumption",Alignment->Center],
{c1,0.5,0.8,0.05},Item["marginal propensity to consume",Alignment->Center],
{PBI,500,1000,100},Item["private business investment",Alignment->Center],
{G,500,1000,100},Item["government expenditure",Alignment->Center],
{t0,100,500,50},Item["lump-sum tax",Alignment->Center],
{t1,0.1,0.8,0.05},Item["marginal tax rate",Alignment->Center],
{TR,100,400,100},Item["transfer income",Alignment->Center],SaveDefinitions->True]
The Keynesian AD model with the foreign sector
==============================================
- Model specification
If the economy is open to international trade, the volume of export and import also affects domestic aggregate demand. If we define "X" as the total volume of export, and "M" as the total volume of import, Subscript[c, 2] Y can approximate the volume of total import, which is a function of marginal propensity to consume for imported goods and the level of income. In this case, our new solution for the AD equation is:
AD=Subscript[c, 0]+(Subscript[c, 1]-Subscript[c, 2])*(Y-t Y+TR)+PBI +G +X
Solve[Subscript[c, 0]+(Subscript[c, 1]-Subscript[c, 2])*(Y-t Y+TR)+PBI +G +X==Y,Y]
- Interactive model
Manipulate[
Row[{Plot[{c0+(c1-c2)*(Y-t Y+TR)+PBI+G+X,Y} ,{Y,0,10000},GridLines->Automatic,AxesLabel->{"Output-Income","Aggregate Demand"},PlotStyle->{Red,Blue},LabelStyle->Directive[Black,Bold], Filling->Bottom,PlotLabel->"Keynesian AD demand model V: Y^*=[c0+c1*TR+c2*TR+PBI+G+X]/(1-c1(1-t)-c2(1-t))",ImageSize->500],
Column[{
Style["Subscript[c, 0] = "<>ToString[c0],FontFamily->"Helvetica"],
Style["Subscript[c, 1] = "<>ToString[c1],FontFamily->"Helvetica"],
Style[ "Subscript[c, 2] = "<>ToString[c2],FontFamily->"Helvetica"],
Style[ "PBI = "<>ToString[PBI],FontFamily->"Helvetica"],
Style[ "G = "<>ToString[G],FontFamily->"Helvetica"],
Style[ "t = "<>ToString[t],FontFamily->"Helvetica"],
Style[ "TR = "<>ToString[TR],FontFamily->"Helvetica"],
Style[ "X = "<>ToString[X],FontFamily->"Helvetica"]
}]}],
{c0,100,500,50},Item["autonomous consumption",Alignment->Center],
{c1,0.5,0.8,0.05},Item["mpc for domestic goods",Alignment->Center],
{c2,0.1,0.6,0.05},Item["mpc for imported goods",Alignment->Center],
{PBI,500,1000,100},Item["private business investment",Alignment->Center],
{G,500,1000,100},Item["government expenditure",Alignment->Center],
{t,0.1,0.8,0.1},Item["marginal tax rate",Alignment->Center],
{TR,100,400,100},Item["transfer income",Alignment->Center],
{X,1000,5000,100},Item["export",Alignment->Center],SaveDefinitions->True]
![The AD model with the foreign sector][2]
Next steps
=====================
The project in this notebook is to build an interactive Keynesian aggregate demand model. With these interactive models, I hope that our students will be able to see the likely effect of the change in the parameter and to better understand the structure, dynamics, and implication of the original Keynesian aggregate demand model. I also hope that many instructors in macroeconomic courses find some of these models pedagogically useful in motivating and enhancing our students effective learning.
The next step in this Mathematica modeling exercise is to (1) show how we can estimate the realistic (range of) values of parameters based upon historical data for the U.S., and (2) to modify the models in a dynamic setting by introducing difference/differential equations. For the modeling building purpose, most of the parameters used in the above are chosen arbitrarily. One important step forward is to conduct some additional statistical analyses based upon the US historical data in order to obtain more realistic parameter values. Another way of improving this project is to introduce time lags among some variables, so that we can transform the aggregate demand equations into difference/differential equations. If successful, the new models will show more complex patterns of dynamic adjustments.
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ADGraphic.png&userId=1727161
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=ADGraphic2.jpg&userId=1727161Hee-Young Shin2019-07-10T19:49:43Z