SRL Archive - Forum Guides

Katex


Olly

2014-10-29 23:18:01

IDK what any of this means, but you show math as a image now!!

[katex=]f'(x) = \lim_{h \to 0}(\frac{2x^2 + 4xh + 2h^2 - 2x^2}{h})[/katex]

Say thanks to core!

The Mayor

2014-10-29 23:22:01

From: Olly
IDK what any of this means, but you show math as a image now!!

[katex=]f'(x) = \lim_{h \to 0}(\frac{2x^2 + 4xh + 2h^2 - 2x^2}{h})[/katex]

Say thanks to core!


Nice! :D

E: y no work for me

Ian

2014-10-29 23:34:24

[katex=]f(x) = (thanks+core)[/katex]

NKN

2014-10-30 06:39:20

[katex=]x = x+3[/katex]

did I do it?

slacky

2014-10-30 07:35:17

From: Olly
IDK what any of this means, but you show math as a image now!!

Correction: It's not a image.

@core: Issue with division (frac and dfrac), the dividing line is two high up:
[katex=]\frac{x}{y}[/katex]


Anyways, tyvm for adding this.

KeepBotting

2014-10-30 07:55:13

yolo = (69 + 420)

wat

rj

2014-10-30 10:05:50

f(x) = 1/1+(1/xo - 1)a-rt

how do i make it work

masterBB

2014-10-30 10:16:28

[katex=]f(x) = 1/1+(1/xo - 1)a^{-rt}[/katex]

Kevin

2014-10-30 10:23:50

From: Robert
f(x) = 1/1+(1/xo - 1)a-rt

how do i make it work


Hit quote on anyone that did it, and then you'll see it fine.
[katex=]Kevin = NKN * Sirenia - Sjoe ^TK + Hoodz * i[/katex]

Edited: Many times over.

masterBB

2014-10-30 11:40:52

From: Kevin
Hit quote on anyone that did it, and then you'll see it fine.

Damn. it doesn't like fake functions. (Quote me to see what I wanted to impose :()


[katex=]Kevin = NKN * Sirenia - Sjoe - TK + Hoodz * i[/katex]
I just doesn't accept the &

Kevin

2014-10-30 13:52:34

From: masterBB
[katex=]Kevin = NKN * Sirenia - Sjoe - TK + Hoodz * i[/katex]
I just doesn't accept the &


So it dislikes bit-wise operators, and I can't figure out how to get multiple characters qualified with a power '^'.

Ian

2014-10-30 13:54:29

From: Kevin
So it dislikes bit-wise operators, and I can't figure out how to get multiple characters qualified with a power '^'.


[katex=]Kevin = NKN * Sirenia - Sjoe ^(TK) + Hoodz * i[/katex]

Edit: my attempt to use ^(TK) has failed

masterBB

2014-10-30 13:55:53

[katex=]Kevin = NKN * Sirenia - Sjoe ^{TK} + Hoodz * i[/katex]

masterBB

2014-10-30 14:00:51

WTF, why if I refresh all katex like things stop working. Can't even edit my post above without me having to repost it.

The Killer

2014-10-30 16:59:06

From: masterBB
[katex=]Kevin = NKN * Sirenia - Sjoe ^{TK} + Hoodz * i[/katex]


Sjoe to the power of TK… damn thats a big number;)

@The Mayor I posted… are you happy? ;)

Kyle

2014-10-30 17:02:39

From: The Killer


@The Mayor I posted… are you happy? ;)


I know I am :D

The Mayor

2014-10-30 17:14:56

From: The Killer
Sjoe to the power of TK… damn thats a big number;)

@The Mayor I posted… are you happy? ;)


Because you've been missing in action?

Daniel

2014-10-30 23:16:28

From: Kevin
Hit quote on anyone that did it, and then you'll see it fine.
[katex=]Kevin = NKN * Sirenia - Sjoe ^TK + Hoodz * i[/katex]

Damn. it doesn't like fake functions. (Quote me to see what I wanted to impose :()


[katex=]\text{Kevin} = \text{NKN} \times \text{Sirenia} - \text{Sjoe}^{\text{TK}} + \text{Hoodz} \times i[/katex]

Kevin

2014-10-31 11:00:34

From: The Killer
Sjoe to the power of TK… damn thats a big number;)

@The Mayor I posted… are you happy? ;)


Indeed. I'm honestly not sure how any of it is valued, and the only part of it in relation to me that I can make sense of is Hoodz * i…. Because I have never touched OSR so that's imaginary for me.

core

2014-10-31 13:49:45

From: slacky
Issue with division (frac and dfrac), the dividing line is two high up


No clue what is causing that. I think it's some css conflict but no chance to solve at the moment. If someone wants to figure it out and tell me, that'd be great.

From: masterBB
WTF, why if I refresh all katex like things stop working. Can't even edit my post above without me having to repost it.


Because of the way I implemented it (lazily), you need to refresh the entire page for the script to execute properly, which doesn't happen if you just edit or make a post. Oops.

Sin

2014-10-31 15:45:54

From: Olly
IDK what any of this means, but you show math as a image now!!

[katex=]f'(x) = \lim_{h \to 0}(\frac{2x^2 + 4xh + 2h^2 - 2x^2}{h})[/katex]

Say thanks to core!


The derivative of [katex=]f(x) = 2x^2 + c[/katex] if i'm doing my integrals correctly.

masterBB

2014-10-31 17:15:35

From: Sin
The derivative of [katex=]f(x) = 2x^2 + c[/katex] if i'm doing my integrals correctly.


uhm

limit h -> 0 means there is no solution if h = 0 , since you divide it by zero. However when I rewrote it, I removed the h:

[katex=]f'(x) = \frac{2x^2 + 4xh + 2h^2 - 2x^2}{h}[/katex]

[katex=]f'(x) = \frac{4xh + 2h^2}{h}[/katex]

[katex=]f'(x) = 4x + 2h[/katex]

[katex=]f(x) = 2x^2 + 2hx + C[/katex]

But I think the h was added with a reason, as a paremeter for function fitting or something similar ;)

Sin

2014-10-31 19:26:37

From: masterBB
uhm

limit h -> 0 means there is no solution if h = 0 , since you divide it by zero. However when I rewrote it, I removed the h:

[katex=]f'(x) = \frac{2x^2 + 4xh + 2h^2 - 2x^2}{h}[/katex]

[katex=]f'(x) = \frac{4xh + 2h^2}{h}[/katex]

[katex=]f'(x) = 4x + 2h[/katex]

[katex=]f(x) = 2x^2 + 2hx + C[/katex]

But I think the h was added with a reason, as a paremeter for function fitting or something similar ;)


Well it's a limit isn't it? The only reason h cant be 0 is because there's a h in the denominator, but once you cancel out you're allowed to replace all the h's with a 0. You end up with
[katex=]f(x) = 4x[/katex]

And i'm pretty sure h = 0 doesn't mean that it doesn't have a solution. It's simply the limit as h approaches to 0. If I try and use the difference quotient on the 2x^2:

[katex=]\lim_{h /to 0}(\frac{f(x+h) - f(x)}{h})[/katex]

[katex=]\lim_{h /to 0}(\frac{2(x+h)^2 - 2x^2}{h})[/katex]

[katex=]\lim_{h /to 0}(\frac{2(x^2 + 2xh + h^2) - 2x^2}{h})[/katex]

[katex=]\lim_{h /to 0}(\frac{2x^2 + 4xh + h^2 - 2x^2}{h})[/katex]

[katex=]\lim_{h /to 0}(\frac{4xh + h^2}{h})[/katex]

[katex=]\lim_{h /to 0}(4x + h)[/katex]

[katex=]=4x[/katex]

So yeah, the function in the OP is the derivative of 2x^2

masterBB

2014-10-31 19:56:56

From: Sin
Well it's a limit isn't it? The only reason h cant be 0 is because there's a h in the denominator, but once you cancel out you're allowed to replace all the h's with a 0. You end up with
[katex=]f(x) = 4x[/katex]

And i'm pretty sure h = 0 doesn't mean that it doesn't have a solution. It's simply the limit as h approaches to 0. If I try and use the difference quotient on the 2x^2:

[katex=]\lim_{h /to 0}(\frac{f(x+h) - f(x)}{h})[/katex]

[katex=]\lim_{h /to 0}(\frac{2(x+h)^2 - 2x^2}{h})[/katex]

[katex=]\lim_{h /to 0}(\frac{2(x^2 + 2xh + h^2) - 2x^2}{h})[/katex]

[katex=]\lim_{h /to 0}(\frac{2x^2 + 4xh + h^2 - 2x^2}{h})[/katex]

[katex=]\lim_{h /to 0}(\frac{4xh + h^2}{h})[/katex]

[katex=]\lim_{h /to 0}(4x + h)[/katex]

[katex=]=4x[/katex]

So yeah, the function in the OP is the derivative of 2x^2


Here you make a mistake
[katex=]\lim_{h /to 0}(\frac{2(x^2 + 2xh + h^2) - 2x^2}{h})[/katex]

[katex=]\lim_{h /to 0}(\frac{2x^2 + 4xh + h^2 - 2x^2}{h})[/katex]

Here you moved the 2 in front of [katex=]x^2 + 2xh + h^2[/katex] but forgot to apply it to the [katex=]h^2[/katex]

correct would be:
[katex=]\lim_{h /to 0}(\frac{2x^2 + 4xh + 2h^2 - 2x^2}{h})[/katex]

continueing:
[katex=]\lim_{h /to 0}(\frac{4xh + 2h^2}{h})[/katex]

[katex=]\lim_{h /to 0}(4x + 2h)[/katex]

But you can't just drop the 2h, that is only that case when it is the other way around. Now we are integrating:

[katex=]f(x) = 2x^2 + 2hx[/katex]

e:
missed the part where you said you used the difference quotient.

Sin

2014-10-31 20:15:15

From: masterBB
Here you make a mistake
[katex=]\lim_{h /to 0}(\frac{2(x^2 + 2xh + h^2) - 2x^2}{h})[/katex]

[katex=]\lim_{h /to 0}(\frac{2x^2 + 4xh + h^2 - 2x^2}{h})[/katex]

Here you moved the 2 in front of [katex=]x^2 + 2xh + h^2[/katex] but forgot to apply it to the [katex=]h^2[/katex]

correct would be:
[katex=]\lim_{h /to 0}(\frac{2x^2 + 4xh + 2h^2 - 2x^2}{h})[/katex]

continueing:
[katex=]\lim_{h /to 0}(\frac{4xh + 2h^2}{h})[/katex]

[katex=]\lim_{h /to 0}(4x + 2h)[/katex]

But you can't just drop the 2h, that is only that case when it is the other way around. Now we are integrating:

[katex=]f(x) = 2x^2 + 2hx[/katex]

e:
missed the part where you said you used the difference quotient.


Ah yeah I admit I did miss that, but wouldn't my point remain the same? 2h is still 0 when h is 0.

masterBB

2014-10-31 20:24:55

From: Sin
Ah yeah I admit I did miss that, but wouldn't my point remain the same? 2h is still 0 when h is 0.


but who says h equals 0. Beside, we just agreed h can't be 0 right? Tbh, I think that limit isn't supposed to be their. h can be 0.

Now about the differnce quotient.

[katex=]\frac{dy}{dx} = \frac{f(x + dx) - f(x)}{dx}[/katex]

because

[katex=]dy = f(x + dx) - f(x)[/katex]

assuming f(x) returns the y value

But how can you suddenly use h as dx?

Sin

2014-10-31 21:49:59

Agreed, h cannot be 0. However, when you're dealing with a limit, h is an infinitely small number approaching zero. In that case, 2(h) is negligible and doesn't need to be included in the derivative.
I'm on my phone so Katex is gonna be annoying, bear with me :P

Let's take x^2 as an example, the derivative of that is obviously 2x.
If we use the first principle of derivatives to actually calculate the derivative, we'd get
lim(h -> 0) (2xh + h^2)/h

which gives you

lim(h->0) 2x + h

And so you treat h as 0 which gives you f'(x) = 2x.

My whole point is that the h is such a small negligible number (funnily enough there's no smallest positive/negative number) and so we treat it as 0.

The Killer

2014-11-01 16:27:19

From: elfyyy
I know I am :D

Good :D I'll pop onto my srl skype more soon…
From: The Mayor
Because you've been missing in action?

Yeah… but tbh I was meant to mention @hoodz which is a bit awkward now…
But gz on SSRL ;)

Hoodz

2014-11-01 16:44:00

From: The Killer
Good :D I'll pop onto my srl skype more soon…

Yeah… but tbh I was meant to mention @hoodz which is a bit awkward now…
But gz on SSRL ;)


i told you mom it already.

Brandon

2014-11-02 09:58:12

From: Sin
The derivative of [katex=]f(x) = 2x^2 + c[/katex] if i'm doing my integrals correctly.


You are.. doing them correct..

This IS the correct answer. h can be 0 or whatever the limit is.. When you get rid of all on the bottom, you are allowed to substitute the limit for h. You are then left with the solution you have above.

Just because it is a limit, does not mean that it has to be close as possible without actually being.. So you are right.

Can even try it in wolframalpha.


Example of the derivative formula being used and h being eliminated by substitution of the limit: http://tutorial.math.lamar.edu/Classes/CalcI/DefnOfDerivative.aspx

Dgby714

2014-11-26 08:24:35

@core; After some testing I don't think it's a css conflict, might just be some javascript. Could prob be fixed by moving katex css and js to the end of the page.

From: Brandon
You are.. doing them correct..

This IS the correct answer. h can be 0 or whatever the limit is.. When you get rid of all on the bottom, you are allowed to substitute the limit for h. You are then left with the solution you have above.

Just because it is a limit, does not mean that it has to be close as possible without actually being.. So you are right.

Can even try it in wolframalpha.


Example of the derivative formula being used and h being eliminated by substitution of the limit: http://tutorial.math.lamar.edu/Classes/CalcI/DefnOfDerivative.aspx


Heh, it was stolen from my katex example that I showed core. http://dgby.org/katex-test/

core

2014-11-26 14:44:33

From: Dgby714
@core; After some testing I don't think it's a css conflict, might just be some javascript. Could prob be fixed by moving katex css and js to the end of the page.


That would require modifying templates instead of isolating all of the changes within the confines of BBcode. Changing templates is annoying, as well as keeping those changes synced across all templates and with any updates that might happen to the BBcode would be too much of an extra maintenance burden and isn't feasible.

If you can find a way to fix this issue, I'm all ears; but whatever changes will likely need to be colocated in the BBcode functionality.

core

2014-11-27 22:14:03

From: Dgby714
@core; After some testing I don't think it's a css conflict, might just be some javascript. Could prob be fixed by moving katex css and js to the end of the page.

@Dgby714; made a plugin that seems to fix these issues. I added it to the forum and it seems to be working. Thanks @Dgby714;!

Dgby714

2014-11-27 22:22:32

From: core
@Dgby714; made a plugin that seems to fix these issues. I added it to the forum and it seems to be working. Thanks @Dgby714;!


=)
Needs to be longer than 3 characters…

J J

2014-11-27 23:54:13

Wow that is a pretty awesome tag to have :) It uses similar notation as a Javascript library I used in one of my Android apps to display Math questions (jqMath). It seems that Katex does server side rendering though and one of the main reason I used jqMath was to require no internet connection at all.

Dgby714

2014-11-28 12:40:19

From: J J
Wow that is a pretty awesome tag to have :) It uses similar notation as a Javascript library I used in one of my Android apps to display Math questions (jqMath). It seems that Katex does server side rendering though and one of the main reason I used jqMath was to require no internet connection at all.


It's using js, it's all done client-side. The "notation" is TeX.

The plugin I wrote just removes a lot of redundancy with core's tag and I added some css changes to fix the issues.