Community RSS Feed
https://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions from all groups sorted by active'SystemModelSimulate' as part of Wolfram Desktop Version-12 gives error!
https://community.wolfram.com/groups/-/m/t/1985766
Dear All,
I tried to run the basic SystemModel command such as
*https://wolfram.com/xid/0bh0k3cbt0fbpw-j4mifd*
using Mathematica-version 12 on MacBook Pro with OS-X Catalina.
But when I run this, I get error:
**SystemModelSimulate**: Failed to build model ...........
Is it due to to the setting of C-Compiler on MacBook Pro.
> I don't have a VS Studio installed but only X-Code. Do I have to
> install VS Studio for SystemModelSimulate to work on OS-X.Vijay Sharma2020-05-26T12:29:31Z[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 put Frame or borders around subgraphs in single Graph?
https://community.wolfram.com/groups/-/m/t/1991513
&[Wolfram Notebook][1]
[1]: https://www.wolframcloud.com/obj/da3e3f00-9a0c-4323-97a3-b23e14e1a3f3Richard Frost2020-05-31T03:56:18ZReading & Plotting Sensors Data on a Webpage Dynamically
https://community.wolfram.com/groups/-/m/t/1992385
I want to read in sensor data (temperature) and plot it in real time. I tested this in the attached notebook.
The sensor is on a WiFi board (ESP8266 12E). I coded the board to send the data to a webpage. I want to read in this data and plot it in real time. All the code works besides the function I used to plot below.
Dynamic[DateListPlot[data, Joined -> True],
SynchronousUpdating -> False]
The notebook is attachedImran Gholizadeh2020-06-01T20:17:40ZWolfram Model Explorer
https://community.wolfram.com/groups/-/m/t/1985729
I've created a 3D/VR Wolfram Model explorer.
- https://wolfram-model-explorer.zolmeister.com
- https://github.com/Zolmeister/wolfram-model-explorer
[![Wolfram Model Explorer][1]](https://wolfram-model-explorer.zolmeister.com/)
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=screenshot.png&userId=1981903
Limitations
- multi-pattern models not supported
- e.g. {{{1, 2}, {2, 3}} -> {{1, 3}, {2, 4}, {4, 3}}, {{1, 1}, {2, 1}} -> {{1, 1}}}
- single-element models not supported
- e.g. {{{1}} -> {{1, 2}, {2}, {2}}}
- hyperedges not visualizedZolmeister Zman2020-05-26T08:50:34ZHow 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
Hello. 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:49ZTrying to Plot a variable vector
https://community.wolfram.com/groups/-/m/t/1992310
Hi,
I am trying to Plot a vector with variables coordinates.
I could already manage to plot a arrow between two points but now i want to change them preferable direct in the Plot.
point1 := {0, 0}
point2[r_] := {5, r}
Manipulate[
Graphics[Arrow[{point1, point2[r]}]], {r, -3, 3}]
I am getting always the error " Tag list is Protected
Hope you can help me.Timo Rausch2020-06-01T12:12:31ZWhy is my SSH not authenticating?
https://community.wolfram.com/groups/-/m/t/1989803
Hi everyone,
I'm writing a bit confused because I've tried everything. I'm hoping for some ideas from people who know what they're doing a little more than me.
I'm trying to SSH into my Cyberpower PDU (device probably not important), which is connected to my computer running Windows 10 via Ethernet cable. I have enabled SSH communication on the device by logging into the IP address that I set it up on.
At first I thought that using `RunProcess` to connect to the IP address of the device and entering my computer log-in credentials would work, because that's how you usually log into your SSH server. Mathematica kept returning an error that my credentials were wrong, even though they weren't.
So then I tried using a keygen, which should be foolproof. Even when I generate a private key and tell Mathematica to use that file to connect to SSH, it still asks me for my computer log-in credentials, which it shouldn't! Because the SSH key should be enough.
Here's an example of the code I've been trying. (Ignore the fact that my SSH key is stored under a different user's folder - my computer wasn't wiped properly before being administered to me.) I also disguised my IP address below. This should be enough to SSH into the network I set up.
RemoteConnect[IPAddress["XXX.XXX.XX.XX"],
Authentication -> <|"Username" -> "Darren",
"SSHKey" -> File["C:\\Users\\chigozie\\.ssh\\id_rsa"]|>]
What could be wrong that Mathematica simply won't accept my log-in credentials or private key? And where might be a better place for me to post this question? Thank you!
Edit: I'll add that my tried to SSH in from Powershell, and my credentials were not accepted there either. They were, however, accepted when I used PuTTY.Darren Anthony2020-05-29T05:32:18ZSimplify 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:38ZHow to plot all possible values of a function on a range
https://community.wolfram.com/groups/-/m/t/1985221
Let say I have a function
f[x_,y_,z_]:=x^3+Abs[(E^y)-5z]
x=Range[0,2.65]
y=Range[0,3.86]
z=Range[0,6]
Now I have to plot all possible values of the function f[x,y,z] against z. It will look like to scattered discrete points in f-z plane.John Wick2020-05-25T19:20:02ZA 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:26ZWhy is my databin "stuck" at 255 entries
https://community.wolfram.com/groups/-/m/t/1991954
Hello,
Wolfram reports that my databin has 273 entries, but then immediately contradicts itself by reporting that it has only 255 entries. Please see below - any idea what is going wrong?
![enter image description here][1]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=2020-06-0112_10_38-Untitled-1_-WolframMathematica12.0.png&userId=1642550Andrew Read2020-06-01T04:15:04ZFrobenius 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:51ZCOVID19: Italian SIRD estimates and prediction
https://community.wolfram.com/groups/-/m/t/1984320
*MODERATOR NOTE: coronavirus resources & updates:* https://wolfr.am/coronavirus
----------
In this document I apply the standard SIRD model , using Italian COVID19 data. Up to date, May 23, there are 89 daily observations, starting from February 24. The model is adjusted and does not cover all possible people to be infected, but only those who been tested and were found positive until May 23. In Italy more than 3.3 million tests were curried so far and the accumulated number of infected people is 228,658 (almost 7%). The infected/tested ratio over the recent days is very low, at most 1% (about 650 new infected per day), compared to more than 30% two months ago. Today is the 89th day and I will solve the problem to predict the key variables until the middle of June (t = 115). Assuming the current number of new infected is around 600 per day, the susceptible population is therefore set equal to about 245,000 over the period under investigation.
After I have retrieved the data, I use 79 out of 89 observations to estimate the key SIRD parameters. Thereafter, using these estimates I solve the system of ODE equations and plot their paths together with the current observations.
&[Wolfram Notebook][1]
[1]: https://www.wolframcloud.com/obj/wolfram-community/Published/ChristosPapahristodoulouItaly.nbChristos Papahristodoulou2020-05-24T16:10:26ZCOVID19: The performance of the Swedish strategy
https://community.wolfram.com/groups/-/m/t/1990972
*MODERATOR NOTE: coronavirus resources & updates:* https://wolfr.am/coronavirus
----------
Christos Papahristodoulou
May 29, 2020
The three Nordic countries together, Denmark, Norway and Finland had in May 28, almost 200 deaths per million inhabitants from the COVID-19. Sweden, with approximately 60% of the population of the other three countries, had 419 deaths per million. Obviously the COVID-19 pandemic hit Sweden much harder. Today it was announced that the other three Nordic countries will enforce quarantine to travellers from Sweden during the summer. In addition, two Mediterranean countries, Greece and Cyprus, just announced that they do not allow tourists from Sweden this summer.
&[Wolfram Notebook][1]
[1]: https://www.wolframcloud.com/obj/e14e2025-70b7-4530-955f-7f00e247e503Christos Papahristodoulou2020-05-30T18:46:43Z[?] 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:39ZWay to solve algebraic nonlinear system from Euler-Lagrange optimization
https://community.wolfram.com/groups/-/m/t/1991492
I'm trying to minimize some integral (functional) subject to another integral constraint, like this:
![enter image description here][1]
The theory to solve it employs Lagrange method as:
![enter image description here][2]
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=integrl.JPG&userId=1991457
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=integral2.JPG&userId=1991457
Then the Euler-Lagrange method:
it tells me that each partial derivative of the function h with respect to the variables x, y, z .. are equal to zero (in my case since the other side of the equality of the Euler Lagrange equations is zero, since there are no derivatives of any kind in function h). So, an algebraic system of equations results from this method, but when I try to solve it with NSolve, or Solve, it doesn't finish (I waited for 24 hours).
Here is the notebook with the derivative of h respect to "c". Where "L" is lambda (Lagrange multiplier), the main parameter (in the pics it would be "x") is "r", and c, l, d, a, b are functions of r, the rest of the letters are parameters. However, l(r) and d(r) are some functions that I "know", so I just want to find out c(r), a(r) and b(r).
D[((w*r*(1 - b))^2 + (v*(1 + a))^2)*c*
r*((l*w*r*b/(Sqrt[(w*r*b)^2 + (v*a)^2])) + (d*a*
v/(Sqrt[(w*r*b)^2 + (v*a)^2]))) +
L*(((w*r*(1 - b))^2 + (v*(1 + a))^2)*
c*((l*a*v/(Sqrt[(w*r*b)^2 + (v*a)^2])) - (d*w*r*
b/(Sqrt[(w*r*b)^2 + (v*a)^2])))), c]jose hoyos2020-05-31T18:56:31ZIs the Wolfram Language a discrete mathematics, in contrast to Euclidean?
https://community.wolfram.com/groups/-/m/t/1991639
Euclidean mathematics assumes that space is continuous. Does the Wolfram language support a discrete space?
If it does. Is it possible to model (for example) the body as follows:
1. Defining a coordinate system to describe the body.
2. Defining a second (smaller and nested) coordinate system to describe bloodflow, movement which happens at a resolution where it doesn't give meaning speaking about a body.
3. Defining a third (even smaller and nested) coordinate system to describe the cell dynamics, which happens at a resolution where it doesn't give meaning speaking about bloodflow.
4. Defining a fourth (the smallest and nested) coordinate system to describe the molecular dynamics of single cells, which happens at a resolution where it doesn't give meaning speaking about a cell.
My question is: Is the Wolfram Language and Mathematics discrete and powerful enough that it can solve the above task?Jonas Båtnes2020-05-31T13:03:46ZProblem of large rules in rulial space
https://community.wolfram.com/groups/-/m/t/1965281
In [Section 8.22 of Technical introduction][1] concerning rulial space we read:
> In principle there are an infinite number of such rules, but any rule
> that involves rewriting a hypergraph that is larger than the
> hypergraph that represents the whole universe can never apply, so at
> least at any given point in the evolution of the system, the number of
> rules to consider is finite.
Is this in fact true? Given any graph rewriting rule of the form $n_k\rightarrow m_k$, value of $n$ is bounded by the current size of the hypergraph, but there seem to be no bounds on $m$. If so, there is actually infinite number of rules that can be applied at any given state of the hypergraph representing the whole universe. The consequence of this is that the evolution graph with use of possible rules is actually fully connected infinite graph, since there is always a rule transforming any possible state of universe (for given $k$) into any other state, both "future" (with hypergraph larger than one in the current state) and "past" (smaller hypergraph), for example by taking the entire hypergraph and rewriting it entirely into another one.
Possible arising problem is whether such evolution of the universe agrees with what we experience as observers? For simplicity, let us assume $m$ fixed to be comparable to the size of the hypergraph at the given stage of evolution. Comparatively small rules, allowing for elegant evolution and producing (hopefully) emergent properties of our universe constitute smaller and smaller fraction of all possible rules as evolution progresses, while large rules almost always transform current hypergraph into universe with no special structure, since among all possible hypergraphs, the structured ones are only tiny fraction. One can answer that conscious observer cannot survive rewriting structured hypergraph into unstructured one, since it is the structure of hypergraph that allows for existence of conscious observer, and that is why we observe only well-structured universe. But there is still highly probable that we find ourselves in one of this almost-normal universes, where maybe simple rules dominate evolution but occasionaly there happens something caused by large-rule rewrite, which does not stop our existence (perhaps some item on my desk suddenly disappears or creates itself out of nothing :)). The problem seems to follow in some sense the [Bolzmann brain argument][2].
So can there by any natural constraint on $m$ in "all possible" rules $n_k\rightarrow m_k$?
[1]: https://www.wolframphysics.org/technical-introduction/potential-relation-to-physics/multiway-systems-in-the-space-of-all-possible-rules/
[2]: https://en.wikipedia.org/wiki/Boltzmann_brain#Identifying_whether_oneself_is_a_Boltzmann_observerDominik Rzepka2020-05-05T09:22:08ZHow can I animate this trajectory?
https://community.wolfram.com/groups/-/m/t/1991109
I have data for the orbital trajectory of an object, but I can't find any guide that tells me how I can animate it.Johnny Hero2020-05-30T23:57:11ZA PAOH hypergraph rendering for Wolfram Models in fundamental physics
https://community.wolfram.com/groups/-/m/t/1991710
I thought I heard a mention of PAOH renderings during my first listen-in to the live physics working sessions. While I wasn't clear that they were wanted or would help, it sounded like a good way to add something, however small, to the search for fundamental physics.
Here is one that works, still improving, does not handle self-loops, feedback welcome.
&[Wolfram Notebook][1]
[1]: https://www.wolframcloud.com/obj/21127214-e64e-4ef4-b6a8-2cbd3dc816fcuartsi fartsi2020-05-31T10:03:16ZPendulum differential equation not computing using DSolve in Mathematica?
https://community.wolfram.com/groups/-/m/t/1991030
Just playing around with features of DSolve in Mathematica and came across a differential equation that DSolve is not able to handle for some reason. Hoping that someone knows why or a workaround for it.
Defined the pendulum differential equation:
eqn1[g_, R_, t_] = D[\[Phi][t], {t, 2}] + g/R*Sin[ \[Phi][t] ] == 0;
Defined parametric initial conditions:
ic[\[Alpha]_, \[Gamma]_] = List[
\[Phi][0] == \[Alpha],
\[Phi]'[t] == \[Gamma] /. { t -> 0 }
];
Defined solution:
sol1[g_, R_, \[Alpha]_, \[Gamma]_, t_] =
DSolve[ { eqn1[g, R, t], ic[\[Alpha], \[Gamma]] }, \[Phi][t], t ]
For some reason, DSolve cannot handle this differential equation (while it is a deceivingly difficult differential equation, it pops up quite commonly in many different physical systems). The error output when running the solution is:
During evaluation of In[3]:= Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information.
During evaluation of In[3]:= DSolve::bvfail: For some branches of the general solution, unable to solve the conditions.
During evaluation of In[3]:= DSolve::bvfail: For some branches of the general solution, unable to solve the conditions.
Out[3]= {}
Has anyone else encountered this with DSolve? Exact solutions to the pendulum differential equation do exist, and initial conditions have been specified to clarify constants in the solution for DSolve. It is unclear to me why this schema is not working to obtain a Mathematica function solution for the pendulum problem.Tim Kirkpatrick2020-05-30T16:25:35ZUtilising cellular automata for computation.
https://community.wolfram.com/groups/-/m/t/1991416
I have a question regarding the possibility of utilising a matrix of actual living cells as "nodes" of a three dimensional biological cellular automata matrix where each cell acts like a state machine with multiple states, and the ability to broadcast their states to their neighbours, while also detecting the states of their neighbours and changing their internal states in response to changes in states of their neighbours.
Brains accomplish this with actual physical connections and branching networks of axons and dendrites and can have tens of thousands of connections to other nodes that can be physically distant.
Could it be done however without the physical "tendrils" that transmit and collect signals, and just use the waves of state changes propagating through a collection of "ordinary" cells? Could it be done while the cells are moving relative to one another within a solution, or would it only work in a solid matrix with stationary nodes?
I thought this forum might be my best chance at finding some people who might have some answers.
I have seen simple calculators built on Conway's Game of Life, and I think it has been shown that it is Turing complete.
I was wondering if there are methods to figuring out what rule sets are Turing complete, and if they are, designing algorithms for computation to be run on them, and estimating the "efficiency" and "computing power" of such systems.Balazs Imri2020-05-31T03:55:32ZInserting Direction
https://community.wolfram.com/groups/-/m/t/1991226
How can I add a traffic route map inside the Wolfram geographical plot? For example, I want to plot the car route/Flight route between Place A and Place B (just like Google map), can I do it in Wolfram?Md Wahidur Rahman2020-05-31T02:15:42ZPlotting 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:01ZIts just a little file in 31 tone equal temperament.
https://community.wolfram.com/groups/-/m/t/1967207
I first wrote this code in 1994. It was version three. I could not ever get it to run to completion.
Puny desktops, and the early versions kept crashing. I got version 12 about a month ago.
I finally get to hear what I write. It has been what? ...30 years.
I'm not too bright. Could anyone help make the code more efficient?
I am sorry if I am breaking the community rules...I am desperate...this is my message in a bottle.
Best wishes.
Patrick Michael Joseph RosePatrick Rose2020-05-07T11:24:59ZSpeed 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:55ZHow to find PDF of a function having specified allowed parameter ranges
https://community.wolfram.com/groups/-/m/t/1990358
I have a function say,
f[x_,y_,z_]:=x^3+(y+z)^4
Now the parameters have their allowed ranges
x€[0,5], y€[9,12], z€[0,4]
How to find the PDF using Mathematica and also plot Histogram of f[ ] vs PDFJohn Wick2020-05-29T21:52:43ZHas 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:34ZKnow of SSR dataset(s) from sizeable group(s) with known loci positions?
https://community.wolfram.com/groups/-/m/t/1990374
Hi, I'm working with Wolfram on some genetic distance measures for SSR profiles of perennial crops. One of the measures requires known absolute or relative positions of the SSR marker loci. Another statistically estimates the positions based on a sizable group of samples from the target species or genus.
So my first question is: Do SSR marker names (e.g., C35H1, FCUP024, LM30N1, M1F1) only indicate sites illuminated by a particular "dye", or can their relative/absolute loci positions be computed from the character sequence in the name, or is/are there a bioinformatics resource with an index of SSR marker vs loci positions?
Second question: would any of you happen to know of SSR dataset(s) from sizeable group(s) with known loci positions?
Thank you!Richard Frost2020-05-29T23:01:00ZLimit 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:24ZMatrix diagonalization by eigen decomposition
https://community.wolfram.com/groups/-/m/t/1989942
Hey!
Let A be n×n matrix. I am looking for its D eigenvalue- and X eigenvector matrices for which: X×D÷X = A, what's more f(A) = X×f(D)÷X.
In this example:
A = {{1,2},{3,2}}
Let's determine its eigenvectors and -values:
{Da, Xa} = Eigensystem[{{1, 2}, {3, 2}}]
The output: {{4, -1}, {{2, 3}, {-1, 1}}} where the eigenvalues are correct and the eigenvectors are not! Because:
Xa*DiagonalMatrix[Da]/Xa returns {{4, 0}, {0, -1}}
which differs to matrix A.
I would like to get {{-1,2/3},{1,1}} as eigenvectors. How to solve the problem?
(I would like to use it for iteration of bigger Carleman matrices. Thank you!)Kristóf Vörös2020-05-29T14:46:51ZFor 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:28ZList of Directed Edges
https://community.wolfram.com/groups/-/m/t/1989313
Hi All,
I am terribly sorry about asking trivial things, but I am complete beginner when it comes to Mathematica.
I also have yet to master a skill of searching through previously posted questions and answers on this forum as I just registered.
I am trying to created a list of directed edges from a list of ordered pairs. So I start with
V = {1,2}
G = Tuples[{V, V}]
DirectedEdge /@ G
Unfortunately, I have extra curly brackets so my output is
{DirectedEdge[{1, 1}], DirectedEdge[{1, 2}], DirectedEdge[{2, 1}],
DirectedEdge[{2, 2}]}
Instead of what I really need
{DirectedEdge[1, 1], DirectedEdge[1, 2], DirectedEdge[2, 1],
DirectedEdge[2, 2]}
I am so sorry for bad formatting. I will fix things a bit later as I am in a hurry to fix the problem.Predrag Punosevac2020-05-28T18:28:00ZHow to speed up Series[]
https://community.wolfram.com/groups/-/m/t/1989958
Hi, several months ago I had a similar problem, but it was actually not resolved. I added the present letter to the former thread, but it did not appear in the dashboard, so that I am writing it as a new question. I need to obtain series expansions of several functions, and it seems that while obtaining a few terms (let's say up to 20) does not present a problem for MATHEMATICA, a request to produce merely 40 terms causes the program to work continuously for more than two days without a perspective to finish soon. The limit of time for a single job, available for me, is 72 hours, so I need to do SOMETHING to reduce this cost. One example is the series:
F[z_]=(1+z+z*th)/(2*z*((Sqrt[1+z]+Sqrt[z]*th)^2)); Series[F[z],{z,∞,40}]; where "th" is a positive parameter. My question is: is there any way to split the calculation process into two or more runs? I presume this would require saving somehow the intermediate results generated by Series[] and read them in in the next run(s). Would this be possible? Or, is there any way of combining the Series[] command somehow with other commands like Simplify[] in such a way so that the intermediate results are simplified before they are subject to further processing? This might reduce the (supposedly exponential) growth of the intermediate results. Or, is there any other method of speeding the calculations that might be applied in this case? Or, as a last resort, is there any method to stop prematurely the execution of Series[] just before the time limit is exhaused, so that I can at least save the terms that were effectively obtained during the three days of calulations, instead of wasting these three days without obtaining anything?
LeslawLeslaw Bieniasz2020-05-29T15:31:43ZI have something that I fail to do. Please help
https://community.wolfram.com/groups/-/m/t/1985839
Hi every one, I failed to do the following expression and make it give accurate results if any one can help me I will be glade.
I attached my expression in a pic "want this" and my trial as "my trial".
the correct answer must equal 0.119 when a=1, b=10, m=3, n=6.
thanks a lot in advance.
a = 1
b = 10
m = 3
n = 6
a^1 b^n (Sum[
Sum[Sum[Sum[(-1)^(k + v - n + m + 1)
If[k == 0, 1,
SeriesCoefficient[Series[(-Log[1 - x])^k, {x, 0, 30}],
p + k]] If[n - k - 2 == 0, 1,
SeriesCoefficient[
Series[(-Log[1 - x])^(n - k - 2), {x, 0, 30}],
q + (n - k - 2)]]
Binomial[n - m - 1, k] Binomial[b - 1,
v] (-PolyGamma[0, -1 + 1/a - k + n + q] +
PolyGamma[0, 2/a + n + p + q + v])/(a (1 + k + p + v) +
1), {q, 0, 30 - (n - k - 2)}], {p, 0, 30 - k}], {v, 0,
b - 1}], {k, 0, n - m - 1}])/((m - 1)! (n - m - 1)!)Ramy Aldallal2020-05-26T14:35:48Z[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:43ZCounting zero in lists
https://community.wolfram.com/groups/-/m/t/1989923
Dear all,
I have 100 lists like the below:
list1={....}
list2={....}
....
list100={....}
For counting zero values for a list I used "Count[list1, x_ /; x <= 0]. How do I use this command for the 100 lists?Alex Teymouri2020-05-29T14:10:11Z