[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Math time!
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /sci/ - Science & Math

Thread replies: 38
Thread images: 2
File: ln-graph.png (4 KB, 460x371) Image search: [Google]
ln-graph.png
4 KB, 460x371
Does anyone know how to replicate a ln(x) function using simple math?

Doesn't need to give a similar result mathematically, but the graph should look similar.

Basically making it peter out.
>>
>not knowing about Maclaurin expansions
underage detected
>>
>>8135475
>replicate a ln(x) function using simple math
>simple math

What does this even mean? Logs are literally basic arithmetic already.
>>
Do a fucking taylor series, you little bitch.
Or just do some type of root if you're just looking for diminishing returns
>>
[math]f(x) = \sum_{k = 0}^x 1/k [/math]
>>
>>8135475
If you need it just for a short interval then you can use linear algebra to find an n-dimensional polynomial that approximates ln(x).

For this you would have to compute the values of ln for the points you want.

Also, this will not guarantee that ln(x)=p(x) where p is your polynomial, just that it will be pretty close.

This has a name but I cannnot remember so just google 'approximate functions using linear algebra' or something like that.
>>
>>8135475
[math]ln(x) = lim_{\epsilon \rightarrow 0}\frac{x^{\epsilon}-1}{\epsilon}[/math]
>>
>>8135505
>[math]ln(x) = lim_{\epsilon \rightarrow 0}\frac{x^{\epsilon}-1}{\epsilon}[/math]
Why didn't that render correctly?
>>
>>8135488

Okay, lets calculate f(5)

Whoops, 1/k=0 does not have a value.

Oh. how dumb of me! You obviously need to take the limit as k approaches 0 for the first step. All right then

f(5) = +infinity

Hmm... I do not think that ln(5) = +infinity but oh well.
>>
>>8135509
It renders fine on TEX preview so 4chan just wants to fuck with you.

Report to the devs or something.
>>
Best polynomial approximation of degree n is the orthogonal projection which can be rewritten as [eqn]\langle\,ln(x),e_1\rangle e_1 + ... + \langle\,ln(x),e_n\rangle e_n[/eqn]
for any orthonormal polynomial basis e_1, ..., e_n.

where [eqn]\langle\,f, g \rangle = \int_T f(x)g(x) dx[/eqn]
T is the target interval.

i'm too lazy to use gram schmidt and find an orthonormal polynomial basis and apply it.
>>
>>8135475
https://encrypted.google.com/#q=y%3D5-1%2Fx
>>
>>8135482
I'm guessing they mean using PEMDAS? (what I always think of for "simple math")
>>8135475
Not really sure how you'd go about this
>>
>>8135546
Great!
Is there any way to stretch it out? Make the hike up take longer but even it out?
>>
x-(1/2)x^2+(1/6)x^3...
Taylor series you mong
>>
>Take the taylor series
You can't take the taylor series of ln(x), you can take the taylor series of ln(x+a) where a ≠ 0, and even then its only valid around x = a±1
>>
>>8135475
Up to what error, and between what numbers?
[math]ln(x) \approx (x-1)+\frac{(x-1)^2}{2}-\frac{(x-1)^3}{3}+\frac{(x-1)^4}{4}\cdots + (-1^n)\left (\frac{(x-1)^n}{n}\right )[/math]

That should give you the nth Taylor aproximation of grade N of ln(x) on point X0=1.
The error at x would be [math]R_{n}(x)=\pm \frac{(\varepsilon -1)^{n+1}}{n+1}[/math]
with [math]\varepsilon[/math] being a number between 1 and x, and its usually taken the number that will make the error the largest
>>
>>8135611
>and even then its only valid around x = a±1

CS major detected. It's valid around x = a±a
>>
>>8135635
No it isn't.
>>
>>8135477
Idk wtf a Maclaurin expansion even is and I'm 25. Even had to go back to read your comment to make sure I spelled it right. Exactly how many nipples do you own anyway?
>>
>>8135647
lol why are you on this board?
>>
>>8135647
>he doesn't know what a maclaurin expansion is at 25 and he's proud of it
>>
>>8135647
Google is your friend, lazy shit. Maclaurin expansion is Taylor expansion about the point 0. If you don't know what Taylor expansion is, you didn't even learn Calculus, in which case gtfo. Or, again, google because Calculus is really fucking easy.
>>
>>8135513
whew lad
>>
>>8135509
>ln(x)
>not \ln(x)
>lim
>not \lim
>\epsilon
>not /varepsilon
anyway your problem is because you need to include a space before [/math]
This should work:
[eqn]\ln(x) = \lim_{\varepsilon \rightarrow 0}\frac{x^\varepsilon-1}{\varepsilon} [/eqn]
>>
File: 400px-HarmonicNumbers.svg.png (7 KB, 400x320) Image search: [Google]
400px-HarmonicNumbers.svg.png
7 KB, 400x320
>>8135475
You want the a function which maps n to the nth harmonic number. See https://en.m.wikipedia.org/wiki/Harmonic_number.
>>
>>8135633
Who the hell taught you math?

The remainder is [math] R_n(x)=(-1)^n \frac{ \xi^{n+1} (x-1)^{n+1} }{ n+1 } = \ln(x) - Taylor_n(x) [/math]
Where [math] \xi \in [1,x] [/math] makes the remainder exact which can then be bounded for error analysis by picking [math] \xi [/math] to be the value that maximizes it.
>>
>>8135668
Is there a real convention for \varx vs \x? From a little bit of searching, it seems to be overloaded as fuck which is a little irritating. \varsigma is final-position sigma (an actual VARIANT!), \vartheta, \varphi, \varepsilon seem to be script form (arguable), and the rest I could find are fucking italic (that's a fucking typeface).
>>
>>8135475
Here's an idea.
[math]\log(x+2^n) = n \log(2) + \log(x/2^n+1)[/math]
If x<2^n then the right hand side only requires computing log(x+1) for x<1, which can be done to required accuracy using a rational approximation such as (x-1)(x+5)/(4x+2) or Taylor series. So the approach would be to subtract out successive powers of 2 to compute x and n for x in the correct range then use the formula. For log(x), x<1, calculate -log(1/x) instead.
>>
>>8135676
Yes, yes. Would you please tell us what [math]\xi ^ {n+1} [/math] is? Because it simplifies to what I just said
>>
>>8135701
No there isn't, but for most people \varepsilon and \varnothing look better than \epsilon and \emptyset
>>
>>8135643
The Taylor series centered on 'a' will converge for all points in the open ball B_a(a). Do you even complex variables?

[math] \ln(x) = \ln(a) - \sum^{ \infty } _ {1} (-1)^{n} \frac{ (x-a)^n } { n a^n } [/math]

[math] radius = \lim_{n \to \infty} \frac { \frac{ 1 } { n a^n } } { \frac{ 1 } { (n+1) a^{n+1} } } = a [/math]
>>
1. ln(x) has a vertical asymptote at x=0
2. The slope of ln(x) decreases as x->∞
A Taylor expansion can't satisfy the first requirement and can only satisfy the second over a limited range.

f(x)=sqrt(x)-1/sqrt(x) satisfies both of those properties, and provides a reasonable approximation for small x (and f(1)=0).
>>
>>8135706
No, you're off by 1 and forgot the (x-1)^n term

You failed it.
>>
>>8135647
This is taught in calc 2. Its first applicatiom is in diffeq with eulers equation for solving linear, second degree, constant coefficient, differential equations when the factorization of the auxillary equation is r=a+/-bi. Even then, you just produce another equation to memorize. You should know this or not comment about your ignorance.
>>
I have wondered about the
following logarithmic functions:
L(x, 1) = ln(x)
L(x, 2) = ln(ln(x)+1)
L(x, 3) = ln(ln(ln(x)+1)+1)
...
L(x, n) = ln(L(x, n-1)+1)
... and how to represent
an intermediate function
L(x, r) where r = a/b
for whole number _a_ and _b_
>>
>>8136585
should have stated
"posint _a_ and _b_"
late night, sorry
>>
>>8135498
interpolation.
Thread replies: 38
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.