#How do I express this sum in terms of n?

86 messages · Page 1 of 1 (latest)

flint gulch
#

i = 1 to n/2

deft charmBOT
flint gulch
#

How do I express this sum in terms of n?

spring rune
#

do you still need help with this?

flint gulch
#

I separated sum(n - i + 1) into sum(n) - sum(i) + sum(1)

My main problem is the sum(i)

Wolfram alpha says it's equal to (n(n+2))/8, but I'm having trouble understanding why

spring rune
#

wanna hop on call. i can help

flint gulch
keen burrow
#

What do you get from that

#

And you are adding 1 n/2 times

#

Those 2 sums should be easy to convert to a normal equation

flint gulch
#

But I'm still confused for the sum of i

keen burrow
#

Ok but that alright since you be gotten 3 sums down to 1

#

Now we are just looking at the sum of 1 + 2 + 3 … n/2

#

There’s a famous formula for this

#

But you might not know it

#

@flint gulch

#

If you don’t know it I can teach it to you

#

Just ping me if you want to learn

flint gulch
#

@keen burrow you mean n(n+1)/2 ?

#

But that doesn't apply in this case, does it?

keen burrow
flint gulch
#

Well I tried replacing n with n/2 and my answer ended up being wrong

keen burrow
#

Set n/2 to = m then

#

m(m+1)/2

#

What does that =

flint gulch
#

(m^2 + m)/2

keen burrow
#

Try changing the m back to n/2 now

flint gulch
#

(n^2/4 + n/2)/2

#

Which is n^2/2 + n I think?

keen burrow
#

No

#

It’s (n^2/2 + n)/4

#

But now you can put all these equations back into one

#

n + (your three equations)

#

Let’s actually keep this so we can put all the number together

keen burrow
#

So it’s n + (n^2 + n + n^2/4 + n/2)/2

#

Hold on I got something messed up 💀

#

wait up

#

Oh it’s - the sum of i

keen burrow
#

n + n(3n/4 + 1/2)/2

#

And from checking that is correct

keen burrow
#

n(1 + (3n/2 + 1)/4)

#

Or on paper to write it a bit neater

#

Do you understand everything @flint gulch

flint gulch
#

@keen burrow I'm still confused, because apparently I'm supposed to get (3n^2 + 2n)/2 for the sum

flint gulch
#

And also when I did all the calculations myself I got (3n^2 + 6n)/8

keen burrow
#

For what sum

flint gulch
#

I mean for the whole sum of n - i + 1

#

Also I'm representing the result as a trinomial because it's for a time complexity function

keen burrow
#

My answer is correct let me just check if those are also =

flint gulch
#

Or how I approached the problem

keen burrow
#

This is the only way I get 3n^2

#

From mine

keen burrow
#

Just try it with any equation and you will find it to be wrong

flint gulch
#

That's why I was so confused

#

Well, thank you for your help

keen burrow
#

It should = 50 when n is 10

#

But you get 160

keen burrow
#

Cus ur answer is closer

flint gulch
#

I'll check tomorrow but for now it's 1am so I'll just mark this as solved

keen burrow
#

Wait meant to be a plus

flint gulch
#

Thanks again :D

keen burrow
#

Accidentally did -

#

Yes you must’ve used 2 n instead of 3 n here

flint gulch
#

I think so yeah

keen burrow
#

When you moved it in you should’ve changed the denominator from 1 to 2

flint gulch
#

How do I mark this as solved btw?

keen burrow
#

.solved

flint gulch
#

.solved

deft charmBOT
#
Solved

Post marked as solved by @flint gulch.

Use .unsolved if this was a mistake.

flint gulch
#

Thanks

keen burrow
#

I like sum problems lol

flint gulch
#

I'm glad you do so you can help me lol

#

Anyway I'm tired so c ya!