473,387 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Comparing Parabolas

427 Expert 256MB
Hi,

Not sure if this qualifies as advanced math, but I'm not sure how to approach this problem.

I use the standard formula:

Expand|Select|Wrap|Line Numbers
  1. y = ax^2 + bx + c where x<= 0, c=0, y>=0, b=0
  2.  
  3. so it can be simplified to y = ax^2
So basically its a parabola only existing in the 2nd (i think) quadrant.

Now I create a second parabola in the same quadrant. The x values for both are always the same (x represents time), but the Y value for parabola 2 is based on the Y value of Parabola 1.

so I came up with the following:
Expand|Select|Wrap|Line Numbers
  1. Y1 = ax^2
  2. Y2 = Y1 + ((Y1)(constant1) + ((a(x-1)^2)*constant2) + Constant3
In the second part I do a(x-1)^2 because we need to look at the Y1 value at the previous X value

My question is:
1 is this mathematically correct,
2 is there a better way of doing this
3 I find the difference between Y1 and Y2 for a given X, at the moment I just go Y2(x-1) - Y1(x), is it possible to do this with just one graph (I doubt this as Y2 relies on Y1, but maybe one of you guys knows some awesome way of doing this)

Thanks in advance
Apr 16 '09 #1
5 3883
JosAH
11,448 Expert 8TB
@cloud255
What does the term ((Y1)(constant1) mean? (it isn't even well-formed). What is your second parabola supposed to represent in terms of the first parabola? In short: I don't understand your maths.

kind regards,

Jos
Apr 16 '09 #2
cloud255
427 Expert 256MB
@JosAH
Apologies for that kind of hard to write the equation with a standard key board but (Y1)(constant1) is suppose to be the Y value for parabola 1 at a given X value multiplied by a constant value.

The first parabola shows a modeling of a perfect scenario, where the second one shows the actual data based on the results of the perfect scenario when affected by given constants if that makes any sense at all.

So parabola 1 shows results in a closed system, parabola 2 shows what happens at each X value based on a deviation from parabola 1 at the previous X value.
Apr 16 '09 #3
JosAH
11,448 Expert 8TB
@cloud255
Am I right saying that you basically want to do this:

Let C1, C2 and C3 be constants.
Let Y1(x) == a*x^2 and Y2(x) == C1*Y1(x)+C2*Y1(x-1)+C3

If so Y2(x) is just another parabola.

kind regards,

Jos
Apr 16 '09 #4
cloud255
427 Expert 256MB
@JosAH
Hi,

Yes, these are the graphs I have now, but is it possible to create one graph which represents the difference between the parabolas for a given x value?

Thanks
Apr 17 '09 #5
JosAH
11,448 Expert 8TB
@cloud255
Sure, you want Y2(x)-Y1(x); it's a parabola too.

kind regards,

Jos
Apr 17 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: beliavsky | last post by:
By mistake I coded something like print ("1" > 1) and got the result "True". Comparing an integer and a string seems meaningless to me, and I would prefer to have an exception thrown. Can...
41
by: Odd-R. | last post by:
I have to lists, A and B, that may, or may not be equal. If they are not identical, I want the output to be three new lists, X,Y and Z where X has all the elements that are in A, but not in B, and...
88
by: William Krick | last post by:
I'm currently evaluating two implementations of a case insensitive string comparison function to replace the non-ANSI stricmp(). Both of the implementations below seem to work fine but I'm...
2
by: Manny Chohan | last post by:
Hi, i have two datetime values in format 11/22/04 9:00 AM and 11/22/04 9:30 AM. How can i compare dates .net c# or if there is any other way such as Javascript. Thanks Manny
3
by: Ricky W. Hunt | last post by:
How does VB.NET determine comparing vs. assigning? For instance, if "checkbox1.checked = True" it only checks the value but leaves it as it whereas if you have "checkbox1.checked = True" by...
19
by: Dennis | last post by:
I have a public variable in a class of type color declared as follows: public mycolor as color = color.Empty I want to check to see if the user has specified a color like; if mycolor =...
4
by: Frank | last post by:
Hello, Developing an app where the user fills out a sometimes quite lengthy form of chkboxes, txtboxes, radbtns, etc. User responses are saved to a mySql db, which the user can later edit. When...
5
by: ma740988 | last post by:
There's a need for me to move around at specified offsets within memory. As as a result - long story short - unsigned char* is the type of choice. At issue: Consider the case ( test code ) where...
20
by: Bill Pursell | last post by:
This question involves code relying on mmap, and thus is not maximally portable. Undoubtedly, many will complain that my question is not topical... I have two pointers, the first of which is...
2
by: Pugi! | last post by:
hi, I am using this code for checking wether a value (form input) is an integer and wether it is smaller than a given maximum and greater then a given minimum value: function...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.