[gview file=”http://oafak.com/wp-content/uploads/2017/09/MCE-511-Mathematica-Introduction.pdf”]
As at close of work yesterday, our practice labs are not ready. Whether they are ready today or not, you will have your deep dive into both software we shall be using. The above note on Mathematica will take half our time. The rest of the time will be an introduction to Fusion 360. Watch out for those notes.
Also note that my programming notebooks are available for you to download. The links are only for those who have gone through the slides and need them as you will see!
I really do not understand the Runges problem sir,does it occur because interpolation was used ?
Lagrange Interpolation helps you to create n-1th order polynomial when you need to fit n points. It is found that when you apply these directly, the fitted curve oscillates at the endpoints. This oscillation, leading the curve to miss the points by far, is Runge’s phenomenon. It occurs in uniform interpolation when the sampling points are equally spaced. That is Uniform Interpolation.
There are twp solutions to this problem:
1. If you are free to select the sampling points; for example if you are the person collecting the data for the project, then selecting non uniform interpolations points that are the zeros of Chebychev polynomials of the first kind (chebychev points) can make the Runge’s problem disappear.
2. The Spline solution. Choosing to fit the points by taking a few at a time while imposing regularity conditions at the endpoints, can also solve the Runge’s phenomenon.
NURBS is Non-Uniform Rational Basis Spline. It is a spline and its sample points are non-uniform. It is easy to see why NURBS and other splines solve the Runge’s phenomenon. Other splines in common use include B-Splines; Bezier curves and T-splines. Fusion 360, as we shall see uses T splines in 3-D. We will see how splines and their control points can help you more accurately obtain close to the exact specs of what you are modeling in the next class: There we shall add points, Move points, change tangents and change curvatures and really see splines at work!
I very well understood the explanation, but I have no idea on the mathematics of this “Chebychev polynomial and Lagrange Interpolation”. A brief overview would do!
Regards!
Chebychev polynomials are special functions of Mathematical physics. They arise from the solutions to differential equations. If you are interested in knowing more about them, you can consult MathWorld.
Thank you sir.
The introduction in today’s class and the note presented was necessary and useful it’s really going to help alot in further operation for anyone who has deep interest….
I couldn’t get the solution for the below equations using mathematica:
x^x + y^y = 31 …… eqn (1)
x + y = 5 …… eqn (2)
I used the code:
Solve[{x^x + y^y = 31, {x + y = 5}, {x,y}]
Where could I have gone wrong Sir?
The Question you posted has an easy answer:
In[1]:= Solve[{x^2+y^2==31,x+y==5},{x,y}]
Out[1]= {{x->1/2 (5-Sqrt[37]),y->1/2 (5+Sqrt[37])},{x->1/2 (5+Sqrt[37]),y->1/2 (5-Sqrt[37])}}
I guess you forgot to use the proper equality sign “==”; instead, you used an assignment “=”. I discussed this issue on Slide 10 in today’s slides. Try it again.
Thank you.
If you really mean raising the variables to variable powers, neither Solve nor NSolve will do. You will have to go into numerical analysis using one of Newton Algorithms such as FindRoot:
In[8]:= FindRoot[{x^x + y^y == 31, x + y == 5}, {{x, 1}, {y, 2}}]
Out[8]= {x -> 2., y -> 3.}
However, this question does not look useful. Try and create useful scenarios from real problems.
Noted. Thank you once again.