Enjoy the fun of physics with simulations!

Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

Title: how to make EJS calculate area under curve ?Post by: lookang on September 22, 2008, 12:20:45 pm
in the learning of
s = u.t +1/2.a.t^2 ds/dt = u + a.t d^2s/dt^2 = a how to make EJS calculate area under curve ? do you have an example for me to learn from? can it be like a universal set of codes that can be modified into any EJS that you have adopted a standard way of variable assignment so that simple copy and paste of codes allow it to work? like a java function http://science.kennesaw.edu/~plaval/applets/HelpInt.html int() Java Math Engine: Integration Symbolic integration can be performed on objects known to the system such as built-in functions, previously defined functions, variable and operations. The symbolic integration engine is not as powerful as the differentiation engine, simply because integration is not as easy. We will list below the kind of functions which can be integrated. The operator which performs symbolic integration is int. There are three ways to use it: 1. int(expr) 2. int(expr, var) 3. int(expr, var, val1, val2) thanks! it appears i have asked this before:) http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=491.0 request for addon in graphical analysis « on: July 05, 2007, 01:14:52 PM » Title: Re: how to make EJS calculate area under curve ?Post by: Fu-Kwun Hwang on September 22, 2008, 02:27:51 pm
This is not the same as previous question at http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=491.0
It is easy with EJS if you just want to calculate the area for know function f(t). Because what you want to do is calculate the integration of the function f(t). Remember in evolution page when you type dx/dt= v; and dv/dt=a; // or what ever function you have provided What EJS did was integrate those two functions : v(t) and a(t) for you. If you save the value x(t) before you let the time evolute as xs and x(t) just after the end time of your integration as xn. Then, xn-xs is the area that you want. Actually, that is the meaning of the integration. A lot of people learn how to calculate the integration or differentiation but did not really understand the meaning of it. If we only REMEMBER what we have learn, we can only solve standard problem in the textbook.To solve REAL PROBLEM we need to apply what we have learn. And it require that we really UNDERSTAND what we have learned. Our current physics/mathematics education system address too much on calculation. We should focus more on CONCEPTUAL UNDERSTANDING. Let's why I put Conceptual Learning of Science as major title for this web site.I do not want to give you code for you to CUT and PASTE. I hope you can solve it by yourself with the above provided information. We should teach our student to learn how to solve problem by themselves. If we alway give them full detail of solution, they will only COPY and PASTE, and most of them will never learn how to solve the real problem. May be you have thought: Why most of the simulations in this web site did not provide full detail information. I did it in purpose. I hope students/users can use the provided information and starts to think about the problem. If they could not figure it out, they can post question and I will provide more information. But I do not want to give full solution in the first place. User will be able to enjoy the joy of learning physics when s/he figure out the problem by her/himself.What teacher should do is helping students to solve the problem, not to solve problem for students to remember. A good physics teacher is not the one that students think the teacher is very good in physics.A good teacher is the one who make students think they can be very good in physics. (students can solve physics problem by themselves.) Title: Re: how to make EJS calculate area under curve ?Post by: lookang on September 22, 2008, 03:04:06 pm
It is easy with EJS if you just want to calculate the area for know function f(t). Because what you want to do is calculate the integration of the function f(t). Remember in evolution page when you type dx/dt= v; and dv/dt=a; // or what ever function you have provided What EJS did was integrate those two functions : v(t) and a(t) for you. If you save the value x(t) before you let the time evolute as xs and x(t) just after the end time of your integration as xn. Then, xn-xs is the area that you want. A good physics teacher is not the one that students think the teacher is very good in physics.A good teacher is the one who make students think they can be very good in physics. (students can solve physics problem by themselves.) Let me try this first! If you save the value x(t) before you let the time evolute as xs and x(t) just after the end time of your integration as xn. Then, xn-xs is the area that you want. When i encounter problem, i am ask again :) I do agree on the strength of empowering, enabling, engaging the students...... make them believe in their own abilities/themselves. I know you are using EJS as a pedagogy tool for deep and meaningful learning. That is why i am learning and sharpening my tool!BTW i figure out the logic of the polygon the simple area of a polygon with 4 vertices (PT[0],PY1[0]) (PT[1],PY1[1]) (PT[2],PY1[2]) (PT[3],PY1[3]). Area = 1/2 ( base)( height) = 1/2 ( PX[3] - PX[0] ) {( PT[2] - PT[3] )+(PT[1] - PT[0])} not as elegant as the method you mentioned Title: Re: how to make EJS calculate area under curve ?Post by: Fu-Kwun Hwang on September 22, 2008, 10:15:22 pm
I know you are a quick and smart learner, that is why I leave more space for you to work out by yourself.
But I will always be available when you DO need help! Your equation only work if two side are parallel. It is O.K. for integration. :D For more general polygon: try to think about the meaning of cross product. A X B |