%% Created by Maple 10.01, Windows 2000
%% Source Worksheet: Weierstrass.mw.mws
%% Generated: Mon Mar 17 18:20:50 CST 2008
\documentclass{article}
\usepackage{maplestd2e}
\def\emptyline{\vspace{12pt}}
\begin{document}
\pagestyle{empty}
\DefineParaStyle{Maple Heading 4}
\DefineParaStyle{Maple Heading 2}
\DefineParaStyle{Maple Text Output}
\DefineParaStyle{Maple Bullet Item}
\DefineParaStyle{Maple Warning}
\DefineParaStyle{Maple Error}
\DefineParaStyle{Maple Dash Item}
\DefineParaStyle{Maple Heading 3}
\DefineParaStyle{Maple Heading 1}
\DefineParaStyle{Maple Title}
\DefineParaStyle{Maple Normal}
\DefineCharStyle{Maple 2D Input}
\DefineCharStyle{Maple Maple Input}
\DefineCharStyle{Maple 2D Output}
\DefineCharStyle{Maple 2D Math}
\DefineCharStyle{Maple Hyperlink}
\begin{maplelatex}\begin{center}\begin{Maple Title}{\underline{\textbf{Rudinin versio Weierstrassin funktiosta }}}\end{Maple Title}
\end{center}\begin{center}\begin{Maple Title}{\underline{\textbf{Jatkuva funktio, jolla ei ole miss��n derivaatta.}}}\end{Maple Title}
\end{center}\begin{center}17.03.08  Heikki Apiola\end{center}\begin{center}Liittyy Markku Halmetojan kirjoitukseen Solmun numerossa 2/2008.\end{center}\begin{Maple Normal}{                                                                                                 }\end{Maple Normal}
\end{maplelatex}\begin{maplelatex}\begin{Maple Heading 1}{\textbf{Apufunktioita: Jaksollinen jatko: JJ}}\end{Maple Heading 1}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{Aivan kuten Fourier-sarjoissa, t�ss� on erinomaisen hy�dyllinen v�line operaattori, joka suorittaa jaksollisen jatkamisen. }\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{Hieno toteutus on per�isin  Maple-gurulta: \textit{Mike Monaganilta}}\end{Maple Normal}
\end{maplelatex}
\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{restart:}}{}
\end{mapleinput}
\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{with(plots):
}}{}
\end{mapleinput}

\mapleresult
\begin{Maple Warning}{Warning, the name changecoords has been redefined}\end{Maple Warning}
\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{}}{}
\end{mapleinput}
\begin{maplelatex}\begin{Maple Normal}{M��ritell��n uudet koodit varmuuden vuoksi my�s t�ss�, vaikka ovatkin  fourier.mpl:ss� (ja ohjelmat.mpl:ss�).}\end{Maple Normal}
\end{maplelatex}\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{# Jaksollinen jatko: MapleTech Vol 3 No. 3 1996 (Mike Monagan)
}\textbf{#
}\textbf{JJ:=proc(f,d::range)
}\textbf{  subs(\{'F'=f,'L'=lhs(d),'D'=rhs(d)-lhs(d)\},
}\textbf{  proc(x::algebraic) local y;
}\textbf{    y:=floor((x-L)/D);
}\textbf{    F(x-y*D);
}\textbf{  end)
}\textbf{end:
}\textbf{
}\textbf{# Esim:
}\textbf{#sw:=JJ(signum,-1..1);
}\textbf{#plot(sw,-4..4);
}\textbf{#
}\textbf{ }}{}
\end{mapleinput}
\begin{maplelatex}\begin{Maple Heading 1}{\textbf{M��ritell��n Rudin funktio }\begin{maplelatex}\mapleinline{inert}{2d}{%phi; 1}{
\[\]}
\end{maplelatex}}\end{Maple Heading 1}
\end{maplelatex}
\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{phi0:=x->abs(x);}}{}
\end{mapleinput}

\mapleresult
\begin{maplelatex}\mapleinline{inert}{2d}{%proc (x) options operator, arrow; abs(x) end proc}{
\[x\mapsto  \left| x \right| \]}
\end{maplelatex}\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{}}{}
\end{mapleinput}
\begin{maplelatex}\begin{Maple Normal}{Jatketaan jaksollisena, jaksov�lin� [-1,1].}\end{Maple Normal}
\end{maplelatex}\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{phi:=JJ(phi0,-1..1);}}{}
\end{mapleinput}

\mapleresult
\begin{maplelatex}\mapleinline{inert}{2d}{%proc (x::algebraic) local y; y := floor(1/2*x+1/2); phi0(x-2*y) end proc}{
\[\textbf{proc} (x::algebraic) \\
\textbf{local} \,y; \\
\mapleIndent{1} y\,:=\,\mathit{floor} (1/2 \ast x::algebraic + 1/2);\\
\mapleIndent{1} \mathit{phi0} (x::algebraic-2 \ast y)\\
\textbf{end\ proc};\]}
\end{maplelatex}\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{plot(phi,-2..2);}}{}
\end{mapleinput}

\mapleresult
\mapleplot{Weierstrassplot1.eps}
\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{}}{}
\end{mapleinput}
\begin{maplelatex}\begin{Maple Normal}{M��ritell��n sarjan osasummafunktio:}\end{Maple Normal}
\end{maplelatex}\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{osasumma:=N->sum((3/4)\symbol{94}k*phi(4\symbol{94}k*x),k=0..N);}}{}
\end{mapleinput}

\mapleresult
\begin{maplelatex}\mapleinline{inert}{2d}{%proc (N) options operator, arrow; sum((3/4)^k*phi(4^k*x), k = 0 .. N) end proc}{
\[N\mapsto \sum _{k=0}^{N} \left( 3/4 \right) ^{k} \left| {4}^{k}x-2\,{\it floor} \left( 1/2\,{4}^{k}x+1/2 \right)  \right| \]}
\end{maplelatex}\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{osasumma(2);}}{}
\end{mapleinput}

\mapleresult
\begin{maplelatex}\mapleinline{inert}{2d}{%abs(x-2*floor(1/2*x+1/2))+3/4*abs(4*x-2*floor(2*x+1/2))+9/16*abs(16*x-2*floor(8*x+1/2))}{
\[ \left| x-2\,{\it floor} \left( 1/2\,x+1/2 \right)  \right| +3/4\, \left| 4\,x-2\,{\it floor} \left( 2\,x+1/2 \right)  \right| +{\frac {9}{16}}\, \left| 16\,x-2\,{\it floor} \left( 8\,x+1/2 \right)  \right| \]}
\end{maplelatex}\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{plot([osasumma(0),osasumma(1),osasumma(2),osasumma(3),osasumma(8)],x=0..1,color=[red,green,blue,black,red]);}}{}
\end{mapleinput}

\mapleresult
\mapleplot{Weierstrassplot2.eps}
\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{}}{}
\end{mapleinput}
\begin{maplelatex}\begin{Maple Normal}{Kuvasta n�kyy, miten osasummat muodostuvat. Arvolle N=8 ei kuvan resoluutio en�� riit�.}\end{Maple Normal}
\begin{Maple Normal}{Lis�t��n laskentapisteit� ja pienennet��n v�li� reippaasti:}\end{Maple Normal}
\end{maplelatex}\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{plot(osasumma(8),x=0..0.001,numpoints=800);}}{}
\end{mapleinput}

\mapleresult
\mapleplot{Weierstrassplot3.eps}
\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{}}{}
\end{mapleinput}
\begin{maplelatex}\begin{Maple Normal}{Nytp� alkaa n�ky�.}\end{Maple Normal}
\begin{Maple Normal}{Katsotaan osasummaa N=10, piennet��n edelleen v�li�.}\end{Maple Normal}
\end{maplelatex}\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{}}{}
\end{mapleinput}
\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{}}{}
\end{mapleinput}
\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{plot(osasumma(10),x=0..0.0001,numpoints=800);}}{}
\end{mapleinput}

\mapleresult
\mapleplot{Weierstrassplot4.eps}
\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{}}{}
\end{mapleinput}
\begin{maplelatex}\begin{Maple Normal}{Ja kerran viel�. Nyt N=15 ja v�li� joudutaan pienent�m��n jo arvoon \begin{maplelatex}\mapleinline{inert}{2d}{%1/10000000; 1}{
\[\]}
\end{maplelatex}.  }\end{Maple Normal}
\end{maplelatex}\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{plot(osasumma(15),x=0..0.0000001,numpoints=800);}}{}
\end{mapleinput}

\mapleresult
\mapleplot{Weierstrassplot5.eps}
\begin{mapleinput}
\mapleinline{active}{1d}{\textbf{}}{}
\end{mapleinput}
\begin{maplelatex}\begin{Maple Heading 1}{\textbf{Summa summarum}}\end{Maple Heading 1}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{On helppo uskoa, ett� n�in voidaan jatkaa loputtomasti. Aina, kun otetaan lis�� termej�, pit�� lis�t� laskentapisteit� }\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{ja rajoittua yh� pienemp��n v�liin. Kuva n�ytt�� aina samanlaiselta. T�ss� ilmenee funktion fraktaaliluonne.}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{Kuvan perusteella funktio n�kyy jatkuvana, mutta miten pieness� ymp�rist�ss� tahansa on ter�vi� kulmia, joten derivaattaa}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{ei ole miss��n. (T�m� ei ole matemaattinen todistus, mutta tekee asian havainnolliseksi ja uskottavaksi.)}\end{Maple Normal}
\end{maplelatex}
\begin{maplelatex}\begin{Maple Normal}{}\end{Maple Normal}
\end{maplelatex}
\end{document}
