Freethought Forum Freethought Forum

Freethought Forum (https://www.freethought-forum.com/forum/index.php)
-   Study Hall (https://www.freethought-forum.com/forum/forumdisplay.php?f=72)
-   -   Homework Help Thread - Linear Algebra Edition (https://www.freethought-forum.com/forum/showthread.php?t=26923)

Ensign Steve 09-24-2012 06:49 PM

Homework Help Thread - Linear Algebra Edition
 
4 Attachment(s)
Hello! :hello:

It is time, once again, for Ensign Steve calm the fuck down, quit pulling out her hair and threatening to quit school, and appeal to the geniuses at :fflove: for some goddamn homework help.

I never took linear algebra, and I have spent the last several years just winging it and sort of muddling through. As such, I know enough to get me in trouble, but not enough to get myself out of it.

If you are so inclined, take a looksee at the slides below and riddle me this:

Why does multiplying rows 3 and 5 by a scalar not affect the right-hand-side values R3 and R5, but adding those lines to row 4 does affect the value at R4?

ceptimus 09-25-2012 09:36 AM

Re: Homework Help Thread - Linear Algebra Edition
 
If you think of each row as an equation perhaps concerning the cost of some items, then multiplying by a fixed number doesn't tell you anything new:

(2 quarts of milk + 3 bagels cost $3.50) x 2 :rarrow: 4 quarts + 6 bagels cost $7.00 :shrug:

But when you combine multiplying a row and adding (or subtracting) from another independent row, then you can work out the cost of the individual items:

2 quarts + 3 bagels cost $3.50

7 quarts + 4 bagels cost $9.00

Now you can work out that a quart costs a dollar, and the bagels are fifty cents each: to do it formally you might multiply the first row by 4/3 and then subtract from the second row to eliminate the bagels from the result.

mickthinks 09-25-2012 10:38 AM

Re: Homework Help Thread - Linear Algebra Edition
 
Quote:

Originally Posted by Ensign Steve (Post 1086559)
Why does multiplying rows 3 and 5 by a scalar not affect the right-hand-side values R3 and R5, but adding those lines to row 4 does affect the value at R4?

Okay, so I've never done cyclic reduction of tridiagonal matrices (you're working above my pay grade, ES), but my guess is that multiplying rows 3 and 5 by a scalar does affect the RHS values, and those slides could do with some editing, including replacing R3 and R5 with R3' and R5' in the 2nd and later slides.

I found this Florida State glossary which suggests there may be other problems with those slides. According to them, cyclic reduction solves for tridiagonal matrices, a class which doesn't include the cyclic tridiagonal matrix used in the slides.

ceptimus 09-25-2012 11:41 AM

Re: Homework Help Thread - Linear Algebra Edition
 
I don't think that slides 2 and 3 are meant to show that nothing is changed by multiplying a row by a scalar - these are just intermediate stages in getting to slide 4 where two of the entries have been zeroed.

It would be clearer (in my opinion) if the R column vector was just omitted from slides 2 and 3.

Ensign Steve 09-25-2012 01:34 PM

Re: Homework Help Thread - Linear Algebra Edition
 
Thanks, you guys are the best! :salute:

Ensign Steve 11-13-2012 03:05 AM

Re: Homework Help Thread - Linear Algebra Edition
 
It's not linear algebra, but it's math, so I'm not going to start a new thread. It's time for diff-eqs! (I've heard it pronounced "diffy-cues", is that really a thing?)

I'm writing a program to approximate a solution to a 2nd order differential equation, and since I'm in CS and not math, I'm not actually expected to know how to solve for the exact solution. Phew!

But I'm still supposed to "find" the exact solution somehow so I can determine whether my program is working. I have matlab on my computer, but it's way too much of a PITA [pdf] to try to do it with a periodic boundary condition, so I gave up. We have Maple at school, but I don't want to wait till tomorrow. I tried wolfram alpha, and it gave me some kind of general solution, but I couldn't figure out how to put in my boundary conditions to get the exact solution.

So, anyway, the equation is:
-y'' + y = 2 sin (x)

and the boundary condition is:
y(0) = y(2pi) and y'(0) = y'(2pi)

Wolfram alpha gives this solution for the equation, without taking the boundary condition into account:
y(x) = c1 ex + c2 e-x + sin(x)

What's that c1 and c2 business? I mean, obviously they are constants, but can I use this information and my boundary conditions to solve this?

Ensign Steve 11-13-2012 03:32 AM

Re: Homework Help Thread - Linear Algebra Edition
 
I had a :brainstorm:

Since y(0) = y(2pi) then c1 e0 + c2 e-0 + sin(0) = c1 e2pi + c2 e-2pi + sin(2pi)

c1 + c2 = c1 e2pi + c2 e-2pi

Don't know what to do with one equations and two unknowns. :scratch:

The solution I'm looking for is a function of x, so one equations and 2 unknowns is okay, but I lost my x.

ceptimus 11-13-2012 06:54 AM

Re: Homework Help Thread - Linear Algebra Edition
 
e^2 pi is about 536

e^-2 Pi is about .002

So c2 is roughly 535 c1.

Just gather the c1 terms on one side and the c2s on the other and you can write an exact ratio so eliminating one of the constants.

Pan Narrans 11-13-2012 11:10 AM

Re: Homework Help Thread - Linear Algebra Edition
 
Remember you have two boundary conditions: y(0) = y(2pi) and y'(0) = y'(2pi)

From the first you get c1 + c2 = c1 e2pi + c2 e-2pi

From the second you get c1 - c2 + 1 = c1 e2pi - c2 e-2pi +1

Which leads to

c1 = c1 e2pi

c2 = c2 e-2pi

The only way to solve this is to take c1 = c2 = 0

And your analytical solution becomes y(x) = sin(x)

Deadlokd 11-13-2012 11:23 AM

Re: Homework Help Thread - Linear Algebra Edition
 
Did you try:

http://upload.wikimedia.org/math/c/1...ee79116ca7.png

or

http://upload.wikimedia.org/math/c/6...7f942cdfdc.png

and if they don't work use:

http://upload.wikimedia.org/math/0/d...72024defda.png

This one isn't as relevant but it still be useful:

http://upload.wikimedia.org/math/7/5...4ea448cdfe.png

Deadlokd 11-13-2012 11:24 AM

Re: Homework Help Thread - Linear Algebra Edition
 
God I'm an idiot. Sorry ES, this is the one you need:

http://upload.wikimedia.org/math/d/f...bba6f6656c.png

Ensign Steve 11-13-2012 02:50 PM

Re: Homework Help Thread - Linear Algebra Edition
 
You guys are so fucking awesome I don't even know what I'd do without you! :wriggle:

Ensign Steve 11-13-2012 02:52 PM

Re: Homework Help Thread - Linear Algebra Edition
 
Quote:

Originally Posted by Pan Narrans (Post 1096065)
From the second you get c1 - c2 + 1 = c1 e2pi - c2 e-2pi +1

:doh:

I like to think I would have thought of that eventually, but now I don't have to! :lol:

Dragar 11-13-2012 02:55 PM

Re: Homework Help Thread - Linear Algebra Edition
 
Quote:

Originally Posted by Deadlokd (Post 1096067)



Solve everything with spherical harmonics and Legendre polynomials! :hyperb:

SR71 11-13-2012 03:05 PM

Re: Homework Help Thread - Linear Algebra Edition
 
Quote:

Originally Posted by Ensign Steve (Post 1096132)
You guys are so fucking awesome I don't even know what I'd do without you! :wriggle:

lol I wonder if Pan Narrans was ever a Professor. He did that thing they do where you want to drive a gutter spike through your temple because you didn't see it yourself.

Good jerb, guys. :) I'm impressed.

BrotherMan 11-13-2012 03:16 PM

Re: Homework Help Thread - Linear Algebra Edition
 
I don't know why I even looked at this thrad. Math is hard.

Ensign Steve 11-13-2012 03:27 PM

Re: Homework Help Thread - Linear Algebra Edition
 
Talk about wanting to drive a stake through your head. Look at my original equation:

-y'' + y = 2 sin (x)

Gee, you think -(-sin(x)) + sin(x) might possibly = 2 sin(x)? :doh:

Ensign Steve 11-13-2012 03:32 PM

Re: Homework Help Thread - Linear Algebra Edition
 
Quote:

Originally Posted by BrotherMan (Post 1096139)
I don't know why I even looked at this thrad. Math is hard.


http://media-cache-ec5.pinterest.com...laa9G1dF_c.jpg

Seriously, math is too damn hard. In undergrad I was going for a Math/CS double major and then when I got into the higher math classes I was like

http://static.someecards.com/someeca...81_3013300.png

Dragar 11-13-2012 03:55 PM

Re: Homework Help Thread - Linear Algebra Edition
 
Quote:

Originally Posted by Ensign Steve (Post 1096141)
Talk about wanting to drive a stake through your head. Look at my original equation:

-y'' + y = 2 sin (x)

Gee, you think -(-sin(x)) + sin(x) might possibly = 2 sin(x)? :doh:

But the boundary conditions, Ensign Steve! The boundary conditions!

Pan Narrans 11-13-2012 08:21 PM

Re: Homework Help Thread - Linear Algebra Edition
 
Quote:

Originally Posted by SR71 (Post 1096137)
Quote:

Originally Posted by Ensign Steve (Post 1096132)
You guys are so fucking awesome I don't even know what I'd do without you! :wriggle:

lol I wonder if Pan Narrans was ever a Professor. He did that thing they do where you want to drive a gutter spike through your temple because you didn't see it yourself.

Good jerb, guys. :) I'm impressed.

:unnope: Not a professor, just a lowly postdoc. One who got a new jerb for studying the ozone layer, though :glasses:


Quote:

Originally Posted by Dragar (Post 1096145)
Quote:

Originally Posted by Ensign Steve (Post 1096141)
Talk about wanting to drive a stake through your head. Look at my original equation:

-y'' + y = 2 sin (x)

Gee, you think -(-sin(x)) + sin(x) might possibly = 2 sin(x)? :doh:

But the boundary conditions, Ensign Steve! The boundary conditions!

Exactly! The boundary conditions made sure you could disregard the general solution (or at least, set the coefficients to zero) and just use the particular solution.

You see, if you have two functions f and g for which

-f'' + f = 2 sin (x)

and

-g'' + g = 0

then their sum satisfies the original equation:

-(f+g)'' + (f + g) = 2 sin (x)

In this case f is the particular solution and g the general solution. You need the boundary conditions to find out which mix of f and g is correct.

Deadlokd 11-13-2012 09:09 PM

Re: Homework Help Thread - Linear Algebra Edition
 
Quote:

Originally Posted by Dragar (Post 1096134)
Quote:

Originally Posted by Deadlokd (Post 1096067)



Solve everything with spherical harmonics and Legendre polynomials! :hyperb:

And Schroedinger's equations!

Sisyphus 11-15-2012 02:28 AM

Re: Homework Help Thread - Linear Algebra Edition
 
Quote:

Originally Posted by Pan Narrans (Post 1096200)
Exactly! The boundary conditions made sure you could disregard the general solution (or at least, set the coefficients to zero) and just use the particular solution.

You see, if you have two functions f and g for which

-f'' + f = 2 sin (x)

and

-g'' + g = 0

then their sum satisfies the original equation:

-(f+g)'' + (f + g) = 2 sin (x)

In this case f is the particular solution and g the general solution. You need the boundary conditions to find out which mix of f and g is correct.

g is the homogeneous solution. The general solution is the sum of the homogeneous solution and the particular solution. Your first sentence above doesn't make any sense.

As to the original question, the ode problem actually _is_ a linear algebra problem where the solutions live in an infinite dimensional vector space (as opposed to the linear algebra case, Ax=b, where the solutions live in a finite dimensional vector space).

Look at your ode and let L=-d^2/dx^2+1, f(x)=2sin(x)...then your ode is just Ly=f (just like Ax=b).

And just like in the linear algebra case where Nul A is non-empty, and you have x=x_homogeneous+x_particular, so in the ode case where the null space of the operator L (really an infinite dimensional matrix) is non-empty (it is spanned by exp(x) and (exp(-x)) and you have y=y_homogeneous +y_particular.

specious_reasons 11-15-2012 04:20 PM

Re: Homework Help Thread - Linear Algebra Edition
 
I haven't touched DiffEq since college, I'm amazed at how little I understood in this thread. Use it or lose it,folks.

Ensign Steve 11-18-2012 10:38 PM

Re: Homework Help Thread - Linear Algebra Edition
 
1 Attachment(s)
BLADOW! How you like me now?

Attachment 8858

:#1:

Dragar 11-18-2012 10:59 PM

Re: Homework Help Thread - Linear Algebra Edition
 
Well done!

So, as I'm a physicist...

Can you think of any physical variables that might be represented by your differential equation?


All times are GMT +1. The time now is 11:08 PM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.

Page generated in 0.20403 seconds with 10 queries