Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Blog post: doing math with EWB
Sat, Oct 5 2024 12:13 PMPermanent Link

erickengelke

Avatar


Most of us are weary of doing complicated math like calculus, especially integrals and must of us tend to avoid it.

But there are lots of situations where there are equations you can find that answer real world problems.   

How do these equations work and can they be done in EWB Web pages?  Will the results be fast and/or accurate?  How do you measure accuracy of numbers and how can you change equations on-the-fly?  How many calculations can be done in a second?

I've written a blog article which shows how to plunk in simple equations and get some useful integration results with helpful general EWB tips along the way.

Don't let the words calculus or integrals scare you from reading this blog post.  

https://erickengelke.com/posts/post49.html

Erick
EWB Programming Books and Nice Component Library
See my EWB BLOG posts, at:
http://www.erickengelke.com
Sat, Oct 5 2024 12:34 PMPermanent Link

erickengelke

Avatar

erickengelke wrote:
> Most of us are weary of doing complicated math like calculus, especially integrals and must of us tend to avoid it.

Backstory...why calculus?

In the blog I gave an example from high school where I blindly typed in a program from a magazine.  That led me to later do a degree in Mathematics at the University of Waterloo in Canada.  It was before the fall of the Iron Curtain, and ours was the largest Math faculty  "in the free world" at the time.  

I have worked for many years in the Engineering faculty at that same school since graduating.  Proud mathie went to the Engineering Side!  Amazingly, both are among the most highly-ranked (among top 100) faculties in the world.

I remember whole courses on Numerical Methods like this, and four years of painful calculus classes punishment.

Now my daughter is studying Engineering also at Waterloo, and she came to me with calculus problems and many other technical challenges which require calculus to solve.  

I have long forgotten most of the integration techniques because I don't use them often.  Or I can use symbolic programs.  But I wrote this simple program to test quick numerical solutions to problems that can be computed on our phones with ease.

I tried to keep the blog article light.

Erick
EWB Programming Books and Nice Component Library
See my EWB BLOG posts, at:
http://www.erickengelke.com
Sat, Oct 5 2024 7:43 PMPermanent Link

erickengelke

Avatar


After enjoying the great outdoors this aft, I discovered math.js, a nice mathematics library for JavaScript.

It does a lot of clever things, including symbolic and numeric computation.

So you can call its derivative function and get the derivative formula for many equations.

It also has an expression calculator which simplifes expressions (collects terms) and can do math with complex numbers, which is handy... but the method I showed with CreateObject() is several orders of magnitude faster for when just requiring real numbers.  Always a tradeoff.

math.js appears to have 3rd party symbolicc integral calculator, but I looked and think that appears to require Node.JS which is outside what I want to use.

Erick


Erick
EWB Programming Books and Nice Component Library
See my EWB BLOG posts, at:
http://www.erickengelke.com
EWB Programming Books and Nice Component Library
See my EWB BLOG posts, at:
http://www.erickengelke.com
Image