I'm playing around in Python at the moment, and I came across an exercise to perform bitwise operations manually (without the built in & | ^ ~ operators).
I understand the operations on paper, and I have a function here that performs them (& in this case, the others are similar):
def...
A question was posed that I decided to have a crack at, and I want to check my understanding. This isn't homework by the way, just trivia. Also the thread title is not really correct but I didn't want to complicate things! Here's the question:
What is the relative difference in the distance...
I've just finished my undergraduate degree, and am enjoying a few weeks of complete bliss with no assignment deadlines! I've been thinking a lot about my future career, and I was hoping to gain some insight and advice on possible directions. I have a B. Comp Sci with a major in Computational...
Homework Statement
I have a quiz question that I'm struggling with. We've been working on using a FTCS scheme with two Essential Boundary Conditions, and now I have a problem with one EBC (ie static) and a Natural Boundary Condition (ie a derivative). The condensed problem statement:
u_{t} =...
Homework Statement
I'm doing a course on numerical solutions of PDE and I am waaaay out of my depth, having not covered differential equations previously. I spoke to my lecturer about this and he said I would be fine as the course is on FDM/FEM and not analytic solutions but this is week 4 and...
Homework Statement
I'm doing a class on Numerical Solutions of DE and I have my first assignment. The problem is stated:
Consider the following second order boundary value problem:
\epsilon \frac{d^{2}y}{dx^{2}} + \frac{1}{2+x-x^{2}} \frac{dy}{dx}-\frac{2}{1+x}y = 4sin(3x), y(0) = 2, y(2) =...
During maths class last semester this integral came up in the course of discussion and my lecturer gave a quick outline of how to solve it but I didn't grasp it at the time and we moved on. I'd like to know how to do it though! The integral is:
\int sin^{2}(x)
The next step was:
\int...
Homework Statement
I have a bag of n coins, and 1 is fake - it has 2 heads.
a) Determine the probability that if I flip a coin and it comes up heads, the coin is fake.
b) If a coin is flipped k times and comes up heads k times, what is the probability that the coin is fake?
Homework...
Homework Statement
Let T be the linear transformation from P2 (R) to P3 (R) defined by
T(f)=14\int_{0}^{x}f(t)dt + 7x.f'(x)
for each
f(x)=ax^{2}+bx+c
Determine a basis {g1, g2, g3} for Im(T).
Homework Equations
as above
The Attempt at a Solution
I evaluated the...
Homework Statement
Determine if the set is a subspace:
S = {(a, b, c) 2 R3 | a − 2b = 0 and 2a + b + c = 0};
Homework Equations
as above
The Attempt at a Solution
It is a subspace, I'm just not 100% sure how to write up the proof. So far I have this:
The set is non-empty...
Homework Statement
I have a function F defined in a slightly strange way, and I'm not asked to test if curl(F) == 0, but I thought I would do this as part of my working out. Lo and behold, it looks like it doesn't == 0, and this means, as far as I know, that there is no scalar potential but...
Homework Statement
I have a function z, and I need to find the derivative dz/dt "using the chain rule without substitution"
Homework Equations
z = x^{2}y^{3} + e^{y}\cos x
x = \log(t^{2})
y = \sin(4t)
The Attempt at a Solution
\frac{\mathrm{d} z}{\mathrm{d} t} =...
I'm reading a binary file with fread, and I'm getting some strange results. This is from the man page:
size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
The function fread() reads nmemb elements of data, each size bytes long, from the stream pointed to by stream, storing them...
I'd like some new material to devour, and I have an interest in this era for some reason, particularly the spy stuff (!) but also the space race, and other associated topics. I don't mind if it's fact or fiction really, it's not an academic pursuit. I'd quite like some books, so I can read them...
I'm taking a Linear Algebra / Vector Calculus course this semester as part of a maths major for my Comp Sci undergrad. degree. We don't have a prescribed text, but I'd very much like a hard copy of something that I can reference. The course is somewhat compressed compared to what the Maths...
I'm going to go ahead and put this to the board, figure I might as well. I'm 30 years old, and a pretty quiet person. Friendly, polite, but stand-offish with most people. Anyway, enough with the background.
There's a girl at my work who I think is great. She's gorgeous, a little reserved, and...
I saw this mentioned in a few threads, and I thought, seeing as I just inherited a 2nd hand digital camera from my dad, maybe I should give it a go. Any tips for a beginner?
I guess I should get a tripod. My camera is an Olympus SP-55OUZ with manual settings and 18x optical zoom. It's a...
Homework Statement
Perform file IO with 3 reader and 3 writer threads using a circular buffer. Read the (text) file in and write the same file out.
The Attempt at a Solution
I have an assignment that requires me to use multiple (3) threads to read data from a file, and multiple threads...
Homework Statement
is e^x^2 = 4 equivalent to e^x = 2
Homework Equations
As above
The Attempt at a Solution
This is just an exercise, but I'm quite stuck as how to show this is true (or false for that matter). I thought to take the log of both sides and use the log identity to get...
Homework Statement
Partial derivative of R = vt cos x with respect to t
Homework Equations
NA
The Attempt at a Solution
Keeping the other variables constant, I get 'v cos x'. (t is 1)
I just want to check this, because it's part of a larger problem and I feel my answer is way...
Homework Statement
Show that the Bisection Method converges linearly with K = 1/2
Homework Equations
Note that x(sub n) converges to the exact root r with an order of convergence p if:
lim(n->oo) (|r - x(n + 1)|) / (|r - x(n)|^p) = lim(n->oo) (|e(n + 1)|) / (|e(n)|^p) = K
The...
I'm 2nd year of 3 into my CompSci degree, and just (!) starting to think about employment after I graduate. I've been ... lost ... shall we say for a good long time, back at uni after a long break, enjoying it, working hard etc ... but I have no idea what I want to do when I finish, except that...
I'd like to improve my conversational skills - I'm kind of anti-social, and it's dawning on me that I am going to die alone if I don't start talking to people. I've reached this strange place in my life, and I don't quite know how I got here. I used to be, well, a bit shy but I could start a...