Welcome! Log In Create A New Profile


Assignment 1 Question 1

Posted by JoJenkinson 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Assignment 1 Question 1
February 15, 2009 03:56PM
Does anybody know if we are supposed to just pick one of the methods to find the roots of y1? We are specifically told to calculate them.
Re: Assignment 1 Question 1
February 20, 2009 04:06AM
I was wondering that myself. Any idea on how to calculate the minima / maxima?
Re: Assignment 1 Question 1
February 20, 2009 09:09AM
Theoretically, I know how to do it, but the differential of function 1 is so nasty that I can't get a result. I have a graphing tool so I even know what they are. Hope somebody will get around to trying it and let us know.
Re: Assignment 1 Question 1
February 24, 2009 08:34PM
Question 1: I am not sure what one is allowed to say, so I give a hint: To get the minima or maxima, try the first derivative = 0 (roots of the derivative). For further info, also look at the second derivative!

Question (1b) I could not get the g(x) method (/fixed-point iteration) to converge! Did any of you succeed? By the way, go and read what this web page says about the g(x) method http://persson.berkeley.edu/128A/lec05-2x3.pdf
Anonymous User
Re: Assignment 1 Question 1
March 17, 2009 08:56AM
Good day ladies and gentlemen!

Have you made any progress with this question? I can't even do part (a) as my f'(x) for y1 also turns into one very nasty beast and I'm not sure how to calculate the turning points from what I get.

Tut 501 doesn't help much and unless I'm missing something, then neither does the prescribed book. Also, are we supposed to do these questions manually or with the aid of computer programs? What type of setup are we to expect in the exams?

If you know, please let us know as I'm not making much headway from the tutorial matter in my possession.
Re: Assignment 1 Question 1
March 20, 2009 08:37PM
I also had the feeling that the study material doesn't meet the assignment "far enough". However, one can figure it out. I would say: this part of the course is about the finding of zero points. What you have to keep in mind, is the 1st year calculus theory. For instance, the local minima and maxima can be found where the first derivative is zero. The sign of the second derivative (positive, zero, negative) tells you whether the specific point is a local minimum, inflextion point or maximum. My biggest problem was the g(x) function that does not always converge. I "cheated" sort of. I found the answers using Muller's method (taking points that brackets the desired zero), writing a program in Java. The Muller's method works like a dream. Once knowing the answer, I selected begin values for the required g(x) method, but very, very close of course. You can do the exercise with Micosoft Excel spreadsheets. We will have to look intensively at past exam papers, because you cannot repeat this in a exam. Remember if you follow the route I followed, you are doing at own risk. At least you get some exercise, following my route. Believe me, when I had the assignment completed, I had that kind of "fed-up" feeling .. the "journey" was fun. The best feeling was, to post the assignment.
Hope this helps,
Re: Assignment 1 Question 1
March 22, 2009 06:29PM
it's possible to find the roots and maxima without using a numerical method (it's basic trigonometry - remember that a trigonometric graph has a period and amplitude).

you won't be able to find the points of intersection analytically though, but i don't think the first part of the question calls for that.

to draw i just used a graphing tool http://www.walterzorn.com/grapher/grapher_app.htm
Anonymous User
Re: Assignment 1 Question 1
April 01, 2009 01:52PM
By now I've given up on trying to understand question 1.

I'm either missing something very obvious or so rusted I can't see the woods for the trees.

The x = g(x) falls under the section in the book looking for roots, this intercepts where y=x (i.e. straight line 45 degrees) - but does not go onto explaining how two nonlinear functions intercept.

As an example, I can see how 0 = x^2 - 2x can be written as x = sqrt(2x) but I cannot see how to isolate x out of 0 = (20/x^2).sin(10/x)

I'll have to accept poor marks for this assignment and try better for the rest... last year's assigment is no help either
Re: Assignment 1 Question 1
April 01, 2009 04:27PM
Have you tried something like this below:
x = g(x1) =( 20Sin(10/x) ) / 5xCos(x).
Anonymous User
Re: Assignment 1 Question 1
April 01, 2009 05:22PM
Since y2=5cos(x) and y1=(20/x^2)sin(10/x)

I could see that you could end up with (y2=y1)

5cos(x) = (20/x^2)sin(10/x)
5cos(x) = (20sin(10/x))/x^2

x = sqrt( 20sin(10/x) / 5cos(x) )

But I'm not sure what this means - if I plug 0.5 as the starting value, then this doesn't converge...
nothing I plug in does...
Re: Assignment 1 Question 1
April 01, 2009 09:03PM
Yes. That (the steps discussed above) is what I did. I did not want to give details, simply for the reasons: (a) I do not know, how much detail is acceptable and (b) I would like to see whether fellow students have different and maybe better ideas. To me, the above comment proves to me that my comment previously, was justified: the gap between the assignment and the study material is rather big. With that I mean, it is understandable that one should use your initiative, however when "the gap is too big" people can get way off the track. I also had the divergence problem with the g(x) method. For that reason, I sort-of "cheated", using another method (Muller) to get the zero points, and then I selected points very, very close to apply using the g(x) method, to get acceptable answers.
Re: Assignment 1 Question 1
April 02, 2009 08:59AM
You only need to find the x where sin(10/x) = 0, since if that is so would have found the root. You don't need to find the root of (20/x^2) since it's impossible for x to be 0.

sin(10/x) = 0 when 10/x = n.pi where n is the period of sin(10/x) Get it? It's easy to check if you draw the graph.
Anonymous User
Re: Assignment 1 Question 1
April 02, 2009 09:48AM
thank you @mxtr, I get part if this, i.e. (something) * sin(?) only influences the amplitute of the graph, the period is clearly locked into the (?) part and can thus be found with your method above. I have no problem establishing where the zero's are, its the points of intercept that I cannot get.

If I take a very simpified version i.e. y1=sin(x) and y2=cos(x), then I know that

x = csc(0)
x = 0

and by the nature of sin() will be zero for evey factor of PI

But where would they intercept ?

I can work this out by 1st looking at the graphs, its when x=PI/4 then y=1/sqrt(2) in either case, when x=7PI/4 then y= -1/sqrt(2)

By I would like to know how to use methods in this module to determine this

sin(x) = cos(x)
0 = cos(x) - sin(x)

-- now what ?

Anyway, I've always struggeled with math and here I go and select another math based module...

[edit start]
geez, I'm stupid

sin(x) = cos(x)


sin(x)/cos(x) = 1
tax(x) = 1
arctan(1) = PI/4 (x part of the intercept)

Plugging this in would sin(PI/4) = 1/sqrt(2) (the y part of the intercept),

[edit end]
Re: Assignment 1 Question 1
April 02, 2009 11:41AM
i posted some code to my blog which should help you understand. im'd the details to you.
Anonymous User
Re: Assignment 1 Question 1
April 02, 2009 01:26PM
@mtxr - thank you for the pm. I'll have a look.

Last year I did COS261 - formal logic 2 - did very poorly in the assignments as the penny only dropped much much later, but walked away with +80% exam pass. I'm sure my understanding of COS2338 will improve...
Re: Assignment 1 Question 1
April 02, 2009 02:05PM
I got 5 forms of x=g(x) out of y1=y2 ..and non of them converged....this book seriously sucks to the nth degree. I can see "Applied Numerical Analysis by Gerald Wheatly and co" converging with the bin after very few iterations.

Re: Assignment 1 Question 1
April 06, 2009 11:49AM
i posted code for a small python script that implements all of the root finding methods from chapter 1 -- including mullers method. it's not documented or thoroughly tested and i guess i could done a neater job i had more than an afternoon to do it in. you will probably have to know a bit of python if u want to run it, but at least you'll have something with which to revise the chapter with.

get it from my blog at http://zahirj.wordpress.com

what you'll need to get it to run

python 2.6
wxPython (you'll need this to run the 'driver' app)

input expressions in standard python expression format.

x^2-5x+4 becomes x**2-5*x+4

any questions/suggestions please leave a comment on the blog. i plan to add graphing and the rest of the cos2338 chapters later on.
Sorry, only registered users may post in this forum.

Click here to login