|
| |||||||
| http://www.narutomania.com/forums/New Month, New Problems |
| For these forums to remain up we need $480 within 7 days. Please donate HERE br> br> We need this amount no matter what to keep this website up. Thank you for your support. |
![]() |
| | Thread Tools |
31-08-2008, 03:00 AM
| #1241 | |
| A://Stocks | Quote:
__________________ | |
| |
31-08-2008, 04:35 PM
| #1242 |
| Raitei Join Date: Nov 2004 Location: Noway
Posts: 1,417
My Mood:
Rep Power: 21 ![]() ![]() |
Dealing with complex numbers Z = a + ib W = c + id Assume that both Z+W and Z*W are real (meaning not a complex number? ie ib & id = 0 ?). Show (prove) that either Z and W are real or that they are the conjugate of one another. Is this as straightforward as it sounds? Like I mentioned earlier proofs are completely new to me and I m not sure how I should formulate it. So if Z + W AND Z * W = real number then it Z and W can be either real numbers or the conjugate of one another. If they are the conjugate of one another I get that Z+W = 2a and Z * W = a**2 + bd If Z and W are real numbers I get that that Z + W = a+c and Z*W = ac Is this a proof? Edit 1 : Anyone here familiar with python? I am "neat" freak and I can't stand the fact that my print statement isn't nicely formated, how the hell do I get a linebreak in python? (not the code, the output, like </br> in html) Edit 2: Another python problem that is eating away at me, this is supposed to compute a sum going from 1 to m for the function (1/k) I am supposed to correct this program s = 0; k = 1; M = 100 while k < M: s+= 1/k print s This program returns nothing, it has three errors apparantely So I tried translating to an algorithm We have variables s = 0, k = 1, M = 100 As long as k is less than M repeat this process Define S as the S in the previous loop (0 in the first loop) + 1/k Print the value of S Now I can see a problem with the variable k as I will be getting an integer division and if k>1 we are fucked, so i changed it into a float Next problem (I think) is the loop itself, it just defines S over and over again and does nothing with it since the print statement is outside the loop it will print the global value of S, being 0, or so i thought, turns out it prints nothing, when I put it inside the loop it generates an infinite amount of increasingly bigger numbers (you would expect the 1/k making it smaller...). I dont understand why, isn't the condition for the loop very clear, as long as K is less than M which is 100? Shouldn't even the faulty loop stop at 100? Gah I have an obsession disorder, I need to know why something doesn't work
__________________ All I am about to do is strike you 8 times okay? Last edited by Keerua; 31-08-2008 at 09:21 PM. |
| |
01-09-2008, 06:05 AM
| #1243 | |||
| Administrator | Quote:
Z = a + bi W = c + di Z + W and Z * W are Real numbers. You are looking to prove that Z and W are Real numbers or conjugates. I'm not sure if that "or" is exclusive or not. Also, note that the b and the d should be in front of the i's (this isn't required, but you will get strange looks if you reverse it). You will want to set your proof up as follows: To Prove: Z and W are Real numbers or conjugates (Z = a + 0i and W = c + 0i or Z = m + ni and W = m - ni) Given: Z = a + bi W = c + di Z + W and Z * W are Real numbers. Quote:
Quote:
__________________ | |||
| |
02-09-2008, 07:00 PM
| #1244 |
| Raitei Join Date: Nov 2004 Location: Noway
Posts: 1,417
My Mood:
Rep Power: 21 ![]() ![]() |
Thank you all problems solved, I am grateful, hope I am not being a pest lol Edit: Hebe what is the point of de Moivres in this situation? Express Cos 4n and Sin 4n as cos n and sin n (where n = Ø (theta)) The end result being: cos^4Ø + sin^4Ø - 6cos^2Øsin^2Ø + i (4cos^3ØsinØ - 4cosØsin^3Ø) I dont know about my professor but I sure as hell like Cos 4n + Sin 4n alot more lol.
__________________ All I am about to do is strike you 8 times okay? Last edited by Keerua; 02-09-2008 at 07:17 PM. |
| |
03-09-2008, 02:07 AM
| #1245 |
| Administrator |
The reason is very simple: cos(mØ) + sin(mØ) * i is hard to work with. That second expression might be ugly, but it is a lot easier to work with in many cases than the alternative as the functions need not be broken up. Wait... Are you sure it was cos(4Ø) + sin(4Ø)? That's a whole hell of a lot easier and has no imaginary part. O.o
__________________ |
| |
03-09-2008, 07:43 AM
| #1246 |
| Raitei Join Date: Nov 2004 Location: Noway
Posts: 1,417
My Mood:
Rep Power: 21 ![]() ![]() |
Yeah that is exactly what it says here cos4n and sin 4n, this is an example from the book "Express Cos 3Ø and Sin 3 Ø as Sin Ø and Cos Ø" It starts off like this: cos 3Ø + isin 3 Ø = (Cos Ø + iSinØ)^3 Now all of a sudden my calculus pulls out an i from god knows where, but in the end result they just forget the i and express sin 3 Ø = 3sinØ - 4sin^3 Ø and cos 3 Ø = 4cos^3Ø - 3 cos Ø obviously the imaginery part is not 0 or sin 3 Ø would be 0.... I thought only physicists could pull things out of their ass in an equation just to make it work
__________________ All I am about to do is strike you 8 times okay? Last edited by Keerua; 03-09-2008 at 07:44 AM. |
| |
03-09-2008, 01:08 PM
| #1247 |
| Monorailpilot provisional |
^ i's usually disappear when squared, and physicists do nothing of the sort, except we do! for more information look up colour forces in particle physics
__________________ |
| |
03-09-2008, 04:48 PM
| #1248 |
| Raitei Join Date: Nov 2004 Location: Noway
Posts: 1,417
My Mood:
Rep Power: 21 ![]() ![]() |
UNIVERSAL CONSTANT FTW Waqo you study physics? That is so awesome dude, I am majoring in physics & astronomy, look forward to mass PM spam next semester as I will be needing you to do my homework
__________________ All I am about to do is strike you 8 times okay? |
| |
03-09-2008, 05:15 PM
| #1249 |
| Monorailpilot provisional |
I'm a physics grad, but yeh if you're ok with poor performance pm away =] I'll be glad to help where I can but admittedly i'm not the best physics student out there. I might be able to help in some relativity stuff ( special not general!!) basic quantum stuff, and my foray into astronomy despite a distinct interest in the theory was a massive failure. Lol I may actually prove much more useful in economics and finance questions (I also majored in Finance and actually did well)
__________________ |
| |
05-09-2008, 03:27 AM
| #1250 |
| Akatsuki |
List the octal and hexadecimal numbers from 16 to 32. Using A and B for the last two digits, list the numbers from 10 to 26 in base 12.
__________________ ![]() ![]() thanks to Tom, ~Mrge and Simonarturo, EE |
| |
06-09-2008, 01:09 AM
| #1251 | |
| Administrator | Quote:
I'll do the base 12 as an example: Code: Base 10: 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 Base 12: a, b, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1a, 1b, 20, 21, 22
__________________ | |
| |
06-09-2008, 06:37 PM
| #1252 |
| Akatsuki |
Yeah, lol, I just needed the base 12, typical me types out the whole question, so there wouldn't be any confusion? Can you explain how you got those numbers?
__________________ ![]() ![]() thanks to Tom, ~Mrge and Simonarturo, EE |
| |
06-09-2008, 06:57 PM
| #1253 |
| Administrator |
In any base, each digit of a number is comprised of 0 through the number one under the base. In base 10, this means 0-9 are used for each place value in the number. In base 12, we use 0-b. In every base system, numbers can be converted to base 10 using this method: base^0 * first digit + base^1 * second digit + base^2 * third digit For a number like 1337 in base 10: 10^0 * 7 + 10^1 * 3 + 10^2 * 3 + 10^3 * 1
__________________ |
| |
09-09-2008, 04:27 AM
| #1254 |
| Chuunin Join Date: Nov 2004
Posts: 235
Rep Power: 16 ![]() |
(a^2+2ab+b^2-c^2)/(a+b-c) thx in advance is so i would apreciate if u explain me how you got to the answer i know how to do these type of equations but i was stuck on this one
__________________ ![]() |
| |
09-09-2008, 07:52 AM
| #1255 |
| Raitei Join Date: Nov 2004 Location: Noway
Posts: 1,417
My Mood:
Rep Power: 21 ![]() ![]() |
The first part can be written as (a+b-c)*(a+b+c) Dividing that by (a+b-c) we get (a+b-c)*(a+b+c)/(a+b-c) = a+b+c I figured it can be written like that because there is only one c in the original equation (-c^2), I dont know the name of this rule in English. Basically: (a+b-c)(a+b+c) = a^2 + 2ab + ac + b ^2 + bc - ac -bc - c^2 = a^2 + 2ab + b^2 - c^2
__________________ All I am about to do is strike you 8 times okay? |
| |
13-09-2008, 04:26 PM
| #1256 | |
| Elite Jounin |
Need some quick C++ help: description: Quote:
Code: #include <iostream>
#include <string>
using namespace std;
int
main()
{
string name;
char b;
int choice;
int border = 1;
cout << "Please enter your name: "; //prompts user for name
cin >> name;
cout << "Please enter a character to use as a border: "; // prompt for border character
cin >> b;
cout <<endl;
for (border=1; border<51; border++) // Loop that prints the top border
{
cout <<b ;
}
cout <<"\n\t\tWelcome " <<name <<"!";
cout << "\nPlease choose a number from the following options: \n\n";
cout << "\t1. Play the game! \n\t2. Demo the game! \n\t3. Exit \n\n";
for (border=1; border<51; border++) // Loop that prints the bottom border
{
cout <<b ;
}
cout <<endl <<endl;
cout << "Please make a game selection! ";
cin >> choice;
cout << "You have entered selection " <<choice <<"!" <<endl;
return 0;
}
__________________ Remember me? Last edited by Ero; 13-09-2008 at 04:34 PM. | |
| |
13-09-2008, 08:44 PM
| #1257 |
| Administrator |
Rather than give you the code for it, I will explain what I would do... I would write a separate function called displayMenu which takes two arguments: a string and an array of strings. The single string is the border character. Note that it should be a string and not a character despite its length. The first string in the array is the menu title, and each subsequent string is an option for the menu. displayMenu will run through all of the array entries and find the longest one by checking the length of each and storing it if it is bigger than the previous length. It will then call another function called padMenuOption which takes a string argument and an integer length and pads the string out on each side with spaces until it reaches the desired length (a few more spaces beyond the length of the longest menu item). It then returns this string and it can be stored in place of the original menu option in the array (you could use pointers as well in theory, but this is often more annoying than just overwriting the original value). Once all of the strings in the string array are paded, displayMenu will run through the array and add the border string to the front and back of each item. Finally, it will check how long any of the menu items is (they should all be the same length at this point) and it will make a string of border characters that is that length by using a loop. Displaying the menu is the last thing displayMenu should do and would involve simply outputting the border character string it just formed, followed by each entry in the array, followed by outputting the border character string it just formed again. There you have it: a simple, scalable menu system that you can use over again in any program you ever make again in the future instead of it being hard-coded for this specific program.
__________________ |
| |
14-09-2008, 12:19 AM
| #1258 |
| A://Stocks |
CalcB Partial fractions integ [(x^3-x-8)/(x^2-x-6)] dx ok so I did the long division and at some point i get this 4x-2 = a(x-3) + b(x+2) I'm a little lost on what to do next, I'm confused how theyre even determining the coefficients. I mean what do I do with the 4x-2 ----------------- different problem, gathering the terms? for some reason I'm not getting sonething so simple? a(x+2) + b(x-1) somehow they get (a+b)x + (2a-b) what did they factor and expand to get to there?
__________________ |
| |