# Search Results

• ### Using Taylor Polynomials Programmatically in Maple

##### - by kzh
I am trying to use a Taylor polynomial programmatically in Maple, but the following does not seem to work... T[6]:=taylor(sin(x),x=Pi/4,6);convert(T[6], polynom, x); f:=proc(x) convert(T[6], polynom, x); end proc; f(1); All of the following also do not work: f:=convert(T[6], polynom); f:=convert(T[6], polynom, x); f:=x->convert(T[6], polynom); f:=x->convert(T[6], polynom, x);. Is there a way of doing this without copying and pasting the output of convert into the definition of f?

• ### Using Taylor Series to Avoid Loss of Precision

##### - by Zachary
I'm trying to use Taylor series to develop a numerically sound algorithm for solving a function. I've been at it for quite a while, but haven't had any luck yet. I'm not sure what I'm doing wrong. The function is f(x)=1 + x - sin(x)/ln(1+x) x~0 Also: why does loss of precision even occur in this function? when x is close to zero, sin(x)/ln(1+x) isn't even close to being the same number as x. I don't see where significance is even being lost. In order to solve this, I believe that I will need to use the Taylor expansions for sin(x) and ln(1+x), which are x - x^3/3! + x^5/5! - x^7/7! + ... and x - x^2/2 + x^3/3 - x^4/4 + ... respectfully. I have attempted to use like denominators to combine the x and sin(x)/ln(1+x) components, and even to combine all three, but nothing seems to work out correctly in the end. Any help is appreciated.

• ### Need help programming with Mclauren series and Taylor series!

##### - by user352258
Ok so here's what i have so far: #include <stdio.h> #include <math.h> //#define PI 3.14159 int factorial(int n){ if(n <= 1) return(1); else return(n * factorial(n-1)); } void McLaurin(float pi){ int factorial(int); float x = 42*pi/180; int i, val=0, sign; for(i=1, sign=-1; i<11; i+=2){ sign *= -1; // alternate sign of cos(0) which is 1 val += (sign*(pow(x, i)) / factorial(i)); } printf("\nMcLaurin of 42 = %d\n", val); } void Taylor(float pi){ int factorial(int); float x; int i; float val=0.00, sign; float a = pi/3; printf("Enter x in degrees:\n"); scanf("%f", &x); x=x*pi/180.0; printf("%f",x); for(i=0, sign=-1.0; i<2; i++){ if(i%2==1) sign *= -1.0; // alternate sign of cos(0) which is 1 printf("%f",sign); if(i%2==1) val += (sign*sin(a)*(pow(x-a, i)) / factorial(i)); else val += (sign*cos(a)*(pow(x-a, i)) / factorial(i)); printf("%d",factorial(i)); } printf("\nTaylor of sin(%g degrees) = %d\n", (x*180.0)/pi, val); } main(){ float pi=3.14159; void McLaurin(float); void Taylor(float); McLaurin(pi); Taylor(pi); } and here's the output: McLaurin of 42 = 0 Enter x in degrees: 42 0.733038-1.00000011.0000001 Taylor of sin(42 degrees) = -1073741824 I suspect the reason for these outrageous numbers goes with the fact that I mixed up my floats and ints? But i just cant figure it out...!! Maybe its a math thing, but its never been a strength of mine let alone program with calculus. Also the Mclaurin fails, how does it equal zero? WTF! Please help correct my noobish code. I am still a beginner...

• ### Function approximation with Maclaurin series

##### - by marines
I need to approx (1-x)^0.25 with given accuracy (0.0001 e.g.). I'm using expansion found on Wikipedia for (1+x)^0.25. I need to stop approximating when current expression is less than the accuracy. long double s(long double x, long double d) { long double w = 1; long double n = 1; // nth expression in series long double tmp = 1; // sum while last expression is greater than accuracy while (fabsl(tmp) >= d) { tmp *= (1.25 / n - 1) * (-x); // the next expression w += tmp; // is added to approximation n++; } return w; } Don't mind long double n. :P This works well when I'm not checking value of current expression but when I'm computing 1000 or more expressions. Domain of the function is <-1;1 and s() calculates approximation well for x in <-1;~0.6. The bigger the argument is the bigger is the error of calculation. From 0.6 it exceeds the accuracy. I'm not sure if the problem is clear enough because I don't know English math language well. The thing is what's the matter with while condition and why the function s() doesn't approximate correctly.

• ### DOM: element created with cloneNode(true) missing element when added to DOM

##### - by user149327
I'm creating a tree control and I'm attempting to use a parent element as a template for its children. To this end I'm using the element.cloneNode(true) method to deep clone the parent element. However when I insert the cloned element into the DOM it is missing certain inner elements despite having an outerHTML value identical to its parent. Surprisingly I observe the same behavior is in IE, Firefox, and Chrome leading me to believe that it is by design. This is the HTML for the node I'm attempting to clone. <SPAN class=node><A class=nodeLink href="/SparklerRestService2.aspx?q={0}" name=http://dbpedia.org/data/Taylor_Swift.rdf> <IMG class=nodeIcon alt="Taylor Swift" src="images/node.png"><SPAN class=nodeText>Taylor Swift</SPAN></A><SPAN class=nodeDescription>Taylor Swift is a swell gall who is realy great.</SPAN></SPAN> Once I've cloned the node using cloneNode(true) I examine the outerHTML property and find that it is indeed identical to the original. <SPAN class=node><A class=nodeLink href="/SparklerRestService2.aspx?q={0}" name=http://dbpedia.org/data/Taylor_Swift.rdf><IMG class=nodeIcon alt="Taylor Swift" src="images/node.png"><SPAN class=nodeText>Taylor Swift</SPAN></A><SPAN class=nodeDescription>Taylor Swift is a swell gall who is realy great.</SPAN></SPAN> However when I insert it into the DOM and inspect the result using FireBug I find that the element has been transformed: <span class="node" style="top: 0px; left: 0px;"<a class=nodeLink href="/SparklerRestService2.aspx?q={0}" name=http://dbpedia.org/data/Taylor_Swift.rdf>Taylor Swift</a><span class="nodeDescription">It's great</span></span> Notice that the grandchildren of the node (the image tag and the span tag surrounding "Taylor Swift") are missing, although strangely the great grandchild "Taylor Swift" text node has made it into the tree. Can anyone shed some light on this behavior? Why would nodes disappear after insertion into the DOM, and why am I seeing the same result in all three major browser engines?

• ### Perform a case insensitive match using Regex without using RegexOptions enumeration

##### - by spoon16
Is it possible to do a case insensitive match in C# using the Regex class without setting the RegexOptions.IgnoreCase flag? What I would like to be able to do is within the regex itself define whether or not I want the match operation to be done in a case insensitive manner. I would like this regex, taylor, to match on the following values: Taylor taylor taYloR

• ### Case insensitive Regex without using RegexOptions enumeration

##### - by spoon16
Is it possible to do a case insensitive match in C# using the Regex class without setting the RegexOptions.IgnoreCase flag? What I would like to be able to do is within the regex itself define whether or not I want the match operation to be done in a case insensitive manner. I would like this regex, taylor, to match on the following values: Taylor taylor taYloR

• ### First Look - Oracle Data Mining

##### - by kimberly.billings
In his blog, JT on EDM, James Taylor shares his analysis of Oracle Data Mining, including its new GUI and Exadata integration. While Oracle Data Mining has been available for a while, it is now easier to access and try via the Amazon Cloud. Using the Oracle 11gR2 Data Mining Amazon Machine Image (AMI), you can launch an Oracle Data Mining-enabled instance directly through Amazon Web Services (AWS) and connect to it using the Oracle Data Miner graphical user interface. The new Oracle Data Mining GUI, which will be available to beta customers soon, provides more graphics, the ability to define, save and share analytical "work flows" to solve business problems, and provides more automation and simplicity. Taylor comments that, "the UI looks to have a nice look and feel including graphical model development flows, easy access to the data, nice little micro graphs when browsing data records and more." On using Oracle Data Mining with Exadata, Taylor writes, "Oracle says that the use of the ODM routines in the Exadata kernel is faster than running a native ODM model in the database by a factor of 2 and that this increases as more joins are used. This could mean that ODM outperforms even third party in-database analytics." Taylor concludes his blog with a positive overall review, stating that "ODM is a nice product for Oracle database customers and well worth looking into. The new UI will only make it more so." Read the blog. var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-13185312-1"); pageTracker._trackPageview(); } catch(err) {}

• ### How to get only one row for each distinct value in the column ?

##### - by Chavdar
Hi Everybody, I have a question about Access.If for example I have a table with the following data : NAME | ADDRESS John Taylor | 33 Dundas Ave. John Taylor | 55 Shane Ave. John Taylor | 786 Edward St. Ted Charles | 785 Bloor St. Ted Charles | 90 New York Ave. I want to get one record for each person no matter of the address.For example : NAME | ADDRESS John Taylor | 33 Dundas Ave. Ted Charles | 90 New York Ave. Can this be done with queries only ? I tried using DISTINCT, but when I am selecting both columns, the combination is allways unique so I get all the rows. Thank you !

• ### iPhone zoom to userLocation

##### - by Taylor Satula
Hi, I need help making my iPhone app zoom to the users current location. I have seen this answered before on StackOverflow ( http://stackoverflow.com/questions/2423236/zoom-on-userlocation )but I have no idea what I am doing when it comes to iPhone development (I make websites not iPhone apps). I need it explained extremely simply, down to where the code snippets go starting from a blank project. Any help is very much appreciated. -- Taylor

• ### Cut Caseload Costs, Speed Service Delivery For Social Services

##### - by michael.seback
Lower Caseload Costs, Speedier Service Delivery with New Oracle Social Services Solution Oracle has just introduced a new solution for social services agencies that's designed to help case workers address the challenges of rising workloads and growing demands by citizens for additional services. In the past, IT departments developed custom software in an effort to meet program outcomes. "Because this capability is out of the box with the Oracle solution, there's less complexity for organizations and an overall lower total cost of ownership," says Kimberly Ellison-Taylor, Oracle's executive director of health and human services. "Self service brings costs down to just pennies per interaction and makes it possible for clients to receive government services more quickly," Ellison-Taylor says. read more

• ### Thank You For Visiting Us At Oracle OpenWorld And JavaOne

##### - by Brandye Barrington
Thanks to everyone who visited us at the Oracle OpenWorld and JavaOne conferences last week. We always enjoy putting faces with names and meeting those of you who are certified or are interested in Certification. Personally, I spent my week on sunny Taylor street at the Java Certification Zone in Taylor Street Cafe.  I talked to over 100 people last week about certification and handed out over 65 ribbons. The Oracle Certification Lounge at OpenWorld, at Moscone South enjoyed more than 200 visitors over the week. Both locations offered scheduled speakers and available experts, in addition to answers to all of your certification questions and account help when needed. We look forward to this opportunity every year to connect with you face to face. If you didn't make it out this year, we hope to see you next year - perhaps we will be so lucky as to enjoy another unseasonably warm week in San Francisco! Stay tuned to our blog for some customer success stories that we were able to record last week.

• ### Maven 3 - duplicate declaration of version

##### - by Taylor Leese
I just upgraded to m2eclipse version 0.10 which includes an embedded Maven 3 and I'm now getting the following error when trying to run a build. I've already set Maven-Installations to my Maven 2 installation, but it had no effect. How do I resolve this? [INFO] Scanning for projects... [ERROR] The build could not read 1 project -> [Help 1] [ERROR] The project com.stuff:sutff-web:0.0.1-SNAPSHOT (C:\development\taylor\stuff\pom.xml) has 1 error [ERROR] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.google.appengine:appengine-api-labs:jar -> duplicate declaration of version \${gae.version} [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

• ### How to get the Blur event to fire for the document on the iPhone?

##### - by Ian Storm Taylor
Does anyone know how to get the blur event to fire on the document for the iPhone? I'm trying to get it to fire either when a user changes windows in Safari, or when they open their bookmarks or when they decide to add the page to their homescreen. But none of these are firing it. Here's my code: \$(document).blur( function () { document.title = "Ian Taylor"; }); I've tried "document", "window", "'body'". Nothing seems to work.

• ### Runge-Kutta (RK4) integration for game physics

##### - by Kai
Gaffer on Games has a great article about using RK4 integration for better game physics. The implementation is straightforward but the math behind it confuses me. I understand derivatives and integrals on a conceptual level but I haven't manipulated equations in a long time. Here's the brunt of Gaffer's implementation: void integrate(State &state, float t, float dt) { Derivative a = evaluate(state, t, 0.0f, Derivative()); Derivative b = evaluate(state, t+dt*0.5f, dt*0.5f, a); Derivative c = evaluate(state, t+dt*0.5f, dt*0.5f, b); Derivative d = evaluate(state, t+dt, dt, c); const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx); const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt * dt; state.v = state.v + dvdt * dt; } Can anybody explain in simple terms how RK4 works? Specifically, why are we averaging the derivatives at 0.0f, 0.5f, 0.5f, and 1.0f? How is averaging derivatives up to the 4th order different from doing a simple euler integration with a smaller timestep? After reading the accepted answer below, and several other articles, I have a grasp on how RK4 works. To answer my own questions: Can anybody explain in simple terms how RK4 works? RK4 takes advantage of the fact that we can get a much better approximation of a function if we use its higher-order derivatives rather than just the first or second derivative. That's why the Taylor series converges much faster than Euler approximations. (take a look at the animation on the right side of that page) Specifically, why are we averaging the derivatives at 0.0f, 0.5f, 0.5f, and 1.0f? The Runge-Kutta method is an approximation of a function that samples derivatives of several points within a timestep, unlike the Taylor series which only samples derivatives of a single point. After sampling these derivatives we need to know how to weigh each sample to get the closest approximation possible. An easy way to do this is to pick constants that coincide with the Taylor series, which is how the constants of a Runge-Kutta equation are determined. This article made it clearer for me: http://web.mit.edu/10.001/Web/Course%5FNotes/Differential%5FEquations%5FNotes/node5.html. Notice how (15) is the Taylor series expansion while (17) is the Runge-Kutta derivation. How is averaging derivatives up to the 4th order different from doing a simple euler integration with a smaller timestep? Mathematically it converges much faster than doing many Euler approximations. Of course, with enough Euler approximations we can gain equal accuracy to RK4, but the computational power needed doesn't justify using Euler.

• ### How to See Which Metro Apps You’ve Installed on Each Windows 8 PC

##### - by Taylor Gibb
The Store in Windows 8 is awesome, but when you have so many apps at your disposal it becomes hard to keep track of what’s installed where, here’s how you can see the apps installed on any of your devices running Windows 8. Hack Your Kindle for Easy Font Customization HTG Explains: What Is RSS and How Can I Benefit From Using It? HTG Explains: Why You Only Have to Wipe a Disk Once to Erase It

• ### Will it be possible to use a non-pae kernel in 12.10

##### - by Roland Taylor
I know that Ubuntu +1 questions are frowned upon, but this I believe is a fair exception. Currently I have 2 systems running Ubuntu 12.10, and one of them has a Pentium M that doesn't support PAE (strange I know, but true). This has meant in the past that I had to rely on a custom iso to install Ubuntu a similar system,and so this time I went with Xubuntu 12.04. My question is 2 fold, but really one question: Is it/will it be possible to install a non-pae version of the 12.10 kernel from the standard repositories? If no, how can I get such a kernel? (Is there a PPA with such a kernel available?). NB: Before anyone suggests that I just install this package: http://packages.ubuntu.com/quantal/linux-image-generic, please note that this comes with PAE enabled. P.S. Yes, I have Googled. I haven't found the answer.