Thank you for inviting me to Paris, if I start to speak too quickly, say something, throw rocks, whatever.  Your French police are wonderful, I highly recommend them. So, I was not there for anything that I may or may not have done wrong. So, I'm here to talk about the OpenBSD WebStack. So, who am I? I've been a sysabin for 20 plus years now. I helped found the Southeast MichiganBSD user group, which is this little tiny dot on the other side of the planet from here. I write books, fiction and nonfiction, and my most recent tech book is on RelayD and HTTPD from OpenBSD. So, let's talk about the web.  The web is the worst thing to happen to the internet in the whole history of the internet. Well, okay, we had to use that, that was pretty bad.  Okay, mailing lists, they're bad too. But really, in the good old days, the internet was just so much better and cleaner and easier. Okay, fine, never mind. So, let's talk about the software lifecycle here. There's a whole bunch of open source developers in here, and you've seen this many times. Once you've been around a few years, you realize that someone writes a simple tool to solve a problem, and it's a great tool, and people love your tool and they start to use it, and you get a patch. And the patch looks nice, it looks good, it adds something on, this is kind of cool.   So, OpenBSD does things a little bit differently. Have you seen the blog post features our fault by Tedu? If you have not, if you take nothing else from this, go read that article. It is written in clear and accessible language. I'm going to turn this so I can paste properly and still see my notes. It's written in clear and accessible language. There's no make files or code or anything in it, but it explains what the problem is with software. The more you add to it, the more complexity you get, and the more ways there are for it to break. OpenBSD has one thing that they do really, really well, and that is saying no. No, you can't have that. No, we're not going to do that. No, this is what this tool does, and no more. And you can pipe it through Setanock and write your own Perl script around it. That's fine. We don't care, but we're not adding that function. And most of us for web servers, we need simple web servers. 90% of the pages on the internet, not the popular sites, but just the raw pages, are pretty simple sites that do pretty simple things. They don't have complicated backends. They're just providing a document or presenting the company phase, or some idiot's website that they publish in an article, and suddenly 50 million people come read it, and their web server bill goes through the roof. It's really simple stuff. And that is the simple stuff is where the OpenBSD web stack really excels. It's composed of the HTTP web server. If I have a criticism of their project, it's that they called the web server HTTP.  RelayD is a general purpose proxy and redirector. They use Carp for IP layer redundancy. All of this plugs into PF, and it's built on top of LibreSSL. The LibreSSL point here is important because if your system doesn't have LibreSSL, you have to either build your own packages or run a different web server. But they use LibreSSL specific APIs. Because why would you use OpenSSL if you had a choice? So it runs on OpenBSD, of course. TrueOS, HardinBSD are built with LibreSSL. I've built custom packages on FreeBSD. And the farther you vary from OpenBSD, the less luck you will have running it. I'm sure someone will port HTTPD to Linux and plug it into IP tables. So, HTTPD, simple web server. The config syntax is reminiscent, and there goes someone who doesn't use LibreSSL. The config syntax looks like nginx, looks like pretty much every other OpenBSD server. It runs privilege separation, ch-rooted, and divar-dub-dub-dub. You configure it in atch-tptd.conf, and dynamic content comes through fast CGI integration. And here's what a config looks like. You set a macro. You define a server. All the servers are virtual servers. You can include a file. You can have web aliases. You listen on the macro on port 80 and set a root directory inside the ch-root. If you have used any OpenBSD software, this should look real familiar. You can also have per-location rules in there. Here we've set, well, we want the whole site automatically indexed. If you're in the files directory, there's no automatic index. You have to know where a file is to be able to grab it. And here we've set up some password authentication. And even put a little message that will appear in the authentication box. So there is a default server that listens on all IPs of the host by default. If a client just does a netcat to port 80 and a get, they get the default server, which is in the htdocs directory. htptd makes heavy use of blocks and redirects. There is no rewrite. There is no, like, Perl-style mod rewrite. This is a feature. There are ways around it, and we'll talk about it. But this, with blocks and redirects, you can do things like here we're listening on port 80, but we transparently redirect to the TLS version of the website. You can use globs. Standard shell globs. You have servers, you know, web servers zero through nine on your web farm. Well, they can all share a config. I'll share a root directory. You can use wild cards again, just like the shell. Here we have any host name under mallard.info. And we have an alias for just plain mallard.info comes here. You can do really complicated, annoying things like this. I don't know why you would want to, but it's an option. Perl-regexes. Does anybody, how many of you feel you know Perl-regexes? Okay, the fact... I normally tell people that they're wrong when they raise their hand. However, the fact that every person raised their hand kind of hesitantly and... Yeah, you're right. From the openBSD perspective, as I understand it, one of the big problems with Perl-regexes is verifying the code is just ghastly. And most people only use a tiny subset. So why add these features that nobody really exercises and with code that is gigantic, nasty, and unavoidable? So instead they grab Lua patterns, which have a lot of regex-style functions. They're much smaller, much simpler. They are not Lovecraftian, and they look a lot like globs. They look so much like globs that they've added this match keyword to say, no, this is a pattern. So, and I'm going to go a little quickly through this. I'm just trying to let you be aware of what's in it rather than teach you how to build this because we have a bunch to get through. Classes of all digits, all printable characters, all alphanumerics. Put classes and characters in brackets. You have all seen this before. You already know how to configure these. Anchoring to the front and back of a string, one or more, zero or more. So, you can use all of this to set server names and directory names and locations. So, HTTPD defaults to the traditional Apache log style. Does anybody here actually use traditional Apache logs? And a few of the OpenBSD people raise their hands in the back. OpenBSD is written for the developers. They like Apache logs. That answers the question of why the hell did they decide on that format. So, it also supports combined logs which most other people use. And you just set that there. Set in the access log, error log. These are all under the CH root. Debugging is pretty straightforward. Test the configuration before you start it. Test an alternate config. If you're really having trouble, you can run the web server in the foreground with verbose debugging and watch as it answers replies. And this is where you discover that you used an asterisk instead of a plus in your Lua pattern. And that's why people are getting the wrong server. Now, dynamic content. PHP rules the web. I'm sorry. There are people staging the revolution, but right now they are the empire. OpenBSD uses slow CGI to support the fast CGI interface. Slow CGI is actually pretty fast, but if you're running dynamic content and you get a 500 error, slow CGI is not running.  And basically you just set a location. You say where the scripts are and tell it fast CGI. And it feeds it to a socket inside the CH root. I'm talking about the CH root. The plus side is if your web server is broken into only stuff inside the CH root is accessible. The downside is, as a sysadmin, only stuff inside the CH root is accessible. Remember, you can't sim link out of a CH root. So if you're running WordPress or something, you will want to add stuff like resolve.con, local time. These critical system files you may need an Etsy host. And if you're running something more complicated, say you have an actual Perl CGI. You'll want to use LDD to find the shared libraries you need and get them in there. But let's look at... If your web server can run WordPress, it can run anything. So let's run some WordPress. Pardon me just a moment. Some important details here. If you go searching for the MySQL package on OpenBSD, you will become very frustrated. They're using MariahDB. Since I discovered that, I'm now using MariahDB everywhere because Oracle. OpenBSD will let you install multiple versions of PHP simultaneously. I strongly recommend you pick one and stick with it. And go into RCConf. You don't need any special flags for HTTPD. But you do want to start your chosen PHP FPM processor, which is fast CGI for PHP. You'll also need a database socket inside the CH route. And you'll need to tell MariahDB to put the socket inside the CH route. OpenBSD also ships all kinds of modules. But the configuration for the PHP module initiation scripts go in this sample directory. You'll want to copy your INI files into the actual PHP configuration. And then start the PHP FPM module. So all you really need to run PHP is tell it an index.php is an index file. And then specify, instead of the default fast CGI socket, tell it no, look at the PHP socket. And that's really it for configuring your dynamic web server. There's no long config file. There's nothing else. And the nice thing is I'm pretty confident, given the people developing it, that it's not going to get... You may get an extra line or two of configuration somewhere sometime, but it's not going to be much. I'm sorry, I moved my head a lot. I'm going to play Dalek a bit. TLS, how many of you run SSL? You do know that TLS is the successor protocol and you should not be running SSL. So having said that, how many of you run SSL?  I know. I'm sorry we're stuck. Remember, TLS, transport layer security is a much better name because it only supports data in transit. TLS does not secure your web server.  All that these certificates do is verify who controls the DNS of that website.  They charge large sums of money to run shell scripts. And when I say that I suck, what I really mean is that I'm envious. So, let's encrypt. How many of you have used let's encrypt? I love BSD cons. I deeply love BSD cons. Okay, so free SSL scripts for everyone, for every purpose, for anything. And let's encrypt works. There are two ways you can verify that you control a domain. Either through an entry on a web page or an entry in a DNS server. OpenBSD includes this ACME client for the automated certificate management environment. I can't hear that name without thinking of Wiley Coyote, by the way. And OpenBSD has the best simple ACME client I have ever seen. I love it. And the certs are good for 90 days. You can manually renew them if you do it that way.  That slide shouldn't have been there. I'm sorry. I've given this talk two times and each time I think I need to pull that slide out. Okay. How ACME works. At the first time you run the client, it creates an authentication key pair with let's encrypt. The client asks the ACME certificate authority what proof it will accept. Let's encrypt accepts HTTP and DNS. Client gets to pick between the options. ACME client only uses HTTP. ACME client creates this certificate signing request, sends it in. Let's encrypt says if you're really this, create a file on the server and sign it. ACME client creates that file, the CA checks the file, verifies the signature, issues a certificate. And OpenBSD has a directory in the CH root just for ACME operations.  Tell it that the root directory is there. This root strip two looks a little odd, but all it means is strip these first two entries off the directory, off the URL before putting it in that root. And don't automatically index your ACME directory. And here is an Etsy ACME client dot com for the domain. You set the domain name, set some alternate domain names, define where each of the files go, and then say sign it with let's encrypt. So with ACME client, start off with ACME client minus A, create that key pair, get that cert. You need the minus D for the domain. The first time you run it, add a couple minus Vs to see what's really happening behind the scene. And then turn on TLS in HTTP dot com. Here I've put in an automatic redirect. And here is the actual TLS website. We're listening on all addresses. We add TLS on port 443. We defined the certificate with the full chain file. We have the path to the TLS key. You can also use HSTS, high security trans. I forget the acronym. Strict transport security. Thank you. Which sounds really cool. But what it means is that if you ever break your SSL, nobody can talk to your site, including let's encrypt. So be real confident in your setup and that you've renewed certs a few times before you do that. Not that I've ever locked my own web server renewal out or anything. There's this fiendishly complicated process to check and renew your script, your TLS certificates.  So do you need to renew? Yes or no? If you get a certificate back, reload the web server. So how many of you have used OCSP before? Okay, OCSP is a, if your website is small and you don't care how fast it is, OCSP is traditionally not been worth your time. Every time you contact a TLS website, your web browser contacts the certificate authority to make sure that the cert is still valid, that it has not been revoked. So this slows down your website. OCSP basically staples a recently generated certificate for your certificate that says this certificate has not been revoked in the last seven days. And it provides that to the client and it provides a bit of a speed up and it doesn't tell the CA when someone is actually using the certificate. So there is a command, OCSP check, set the file, set the key, plug it into httpd.com. It is so easy, it is suddenly worth doing for everyone. OCSP certs expire weekly. Use this complicated shell script. The worst part is the path to your key files and reload the web server if you have a new one.  You can affect the TCP behavior of the web server in httpd.com. You can set a time to live on your web server packets. So if you don't want this website accessible outside the company, even if the firewall team screws up again, you put a time to live of two on your website packets and they can't leave the company. You can change TLS versions and ciphers, don't do that. The ciphers and versions were chosen by people smarter than you. If you have users with their own websites, put their home directories inside the CH route. Okay, Relady. Relady is an arbitrary traffic redirector. OpenBSD comes with PF. It can redirect traffic to hosts inside your firewall. And it includes a load balancer that is basically fault oblivious. It sends traffic to hosts whether they are alive or not. And Relady is basically, it just tests the host to see if they should receive traffic and it adjusts the tables in the firewall appropriately. So Relady can also act as a layer 7 proxy. You can terminate a TCP connection at it, muck with the connection and create a new connection. Always start with a PF firewall, a working firewall. You have to have packet forwarding, make sure that the inside can't connect to the firewall. The usual lock down your host. So Relady has four components, a parent process, thank you privilege separation, a host check engine that pokes at all of your servers and sees if they're still alive, a PF engine that talks to the firewall, and a relay engine that accepts and creates connection. Relay control manages all of this. Relady's, the part I usually use is the redirection, which is just pure TCP IP forwarding.  Okay, you have tables, you can say listen on the outside address and forward to these servers, forward to servers in this table, and this is how you check those hosts. You can set macros like every other open BSD program. You can use relay control to check and show what redirections you have, what hosts are there, are they up and working, how many hosts are in a current table. Host checks, you can check by ICMP ping. You can do TCP port tests, HTTP response code tests. Are you getting a 200 error? Do you suddenly have 500 errors? You can check and see if TLS is working. You can do HTTP response codes over TLS. And you can check the integrity of files, download a file from the web server, SHA-256 check it, if it matches, great. You can also do things like, here we're forwarding to a mail server and we send this string, nothing, and we expect 220, mail.MichaelWLukas.com is my mail server working. Keep it in the pool or not. Here I have a script to check a DNS server, which we dig a domain name, we grep for the string that means that there is an authoritative answer here, and we invert the return code and send it back. If the DNS server is serving authoritative data, keep it in the pool. Relays accept TCP connections, accept traffic, create new connections and forward it on and can filter the traffic. I am hurrying up a little here because we had camera trouble in the beginning. I'm sorry I did not anticipate that. Here's a common thing you'll see where we relay traffic to SSH servers inside your firewall so your developers can get access. And we've defined a protocol here down at the bottom, this protocol fix-up where we apply a change to the TCP stack. When you create this connection, use TCP no delay. I encourage all of you at some time to run an SSH connection without TCP no delay. It is an education. Relays let you do really strange things. Here we've defined this HTTP protocol called get only and it passes anything with an HTTP method of get and then it returns an error for anything else that says forbidden method. My developer swears to me that his application only uses HTTP gets. He's promised this. Let's find out. You can block requests. Bill has also promised that he will never again use PHP MyAdmin. So we're blocking that particular URL and we're returning an error message for Bill. In writing this book, I discovered there's this thing called WebSockets that basically reimplement TCP IP inside HTTP. You can set something that says I can't request this through this upgrade method. Say no, no, we don't allow WebSockets. I also encourage you to try this because it is an education on just what Web developers will do to get around the fact that we have blocked everything but port 80.   So here's a config straight from the example that you can put your SSL on the load balancer, take it off the web server. These days, a TLS acceleration is not as desperate and neat as it once was. However, if you find yourself stuck and the new hardware hasn't arrived and you've got to get some load off the web servers, it is nice to have the option to move that load elsewhere. Other things I realize, they do not do SNI yet. There is a rewrite in progress to work on that. You can enable and disable client-side renegotiation, session tickets, et cetera, and you can do high availability with KERP. So I have probably about 30 seconds. A little more, five minutes. So we have a few minutes to talk real lady. I'm going to take care of something now as a U.S. citizen. Trips like this are deductible on my taxes if they are for business. So I need to say, I'm a writer. Buy books, please. Thank you. So and if this should show up in an IRS audit, this session tape, it's nothing against you personally, Mr. Auditor. I love you. You are a nice man. So are there any questions? We'll start in the front. Yes, sir. The Beaches WebStack with the library for first CGI to write it in C. It's from the same guy who made the Acme Client, if you heard of it. I haven't worked with that. Question. First thing to answer to that question, the author of both Acme Client and Beaches and Mando, Chris Depps Johnson's explicitly told me to greet everybody at this conference he stuck in LA and couldn't come. Second thing, I'm currently doing an audit on that library on behalf of Chris Depps company, K-Pam. And I must say reading the code is fun. It is very small. It is very clean. It is idiomatically written. So if you have a choice, then writing a web application in pure NCC with the Beaches stack is probably superior to writing it in PHP. But of course, you have a nice... And it's also quite true to the OpenBSD way. For example, myself, I have also written my main web application, my own OpenBSD org in NCC without any scripting language that works and it gives quite nice and fast applications. But sorry for... Thank you. I love BSD cons. Other people answer the questions. Next question. Let's say I have two hosts, load balance with Relady. Can I tell Relady, hey, I'm working on that one host. I want to do a software upgrade. Please keep that out of the rotation. And don't fiddle with the PF tables in the next few minutes. Of course you can. Perfect. Thank you. I was wondering, you said that the HTTP server is shrewd, but is shrewd. C-H shrewd. C-H shrewd. Oh, yes. But is the PHP FastG server C-H shrewd as well? Yes. Okay. Yes, you put the socket into the HTTP C-H root and the PHP itself runs elsewhere. I trust them to have locked it down. I shouldn't, but I do. Hi. I'm pretty sure you template for your configuration for HTTP, at least for virtual hosts. Do you have a specific template for HTTP only before using Acme Client to generate your first certificate? Or do you have some kind of automation? That's sort of chicken and egg problem I see here. Yes. What I usually do to bootstrap TLS on the web server is I run a simple site that only has the virtual server and the Acme entry and I generate the cert there and then I switch everything over to TLS and let's encrypt, we'll go to the TLS site to check for the new Acme updates.  What about HTTP 2? Yes. Yes. What are the penalties for violent crimes in France? Asking for a friend? I'm sorry? Yeah. Oh, call it a protest. Okay. The web server is what it is. If it does not meet your needs, feel free to use a different one. Having said that, you know, there are people working on the OpenBSD folks watch what's happening. One of them will need HTTP 2 and they will. Oh, and just for the record for the camera, since the camera's pointing it up here, can we show that Peter Hessler has raised his hand? Oh, no, you raised your hand. We know who's responsible. So first off, HTTP 2 solves the problem in the wrong way. The correct answer is don't load 700 JavaScript things in your web app. Two, the other answer is use a different web server. Don't care. Can I add another web header to HTTP like HPKP? Relady will let you add all kinds of web headers. I do not recall off the top of my head if HTTP will let you add a header. No, thank you. Just curious, do you use this for your own websites? I use this for some of my websites. I'm switching the rest over. I'm running my, my database stuff goes on a ZFS backed web server. However, I'm planning to do a book on free BSD packaging next year. So I'll be building Libre SSL packages and going that way. Okay, thank you. I have a question concerning Acme client in an enterprise environment. So only for internal use, how do you get the certificate there? Well, there's a, how do you get a certificate in private enterprise that if it's a private site. What I would do is there is a back in the day, we called it split horizon DNS. Where you had a public DNS entry for something and then a private DNS entry with a different IP. And depending on where you were, you got different answers. So, and you can have multiple names on one Acme client cert. So I would put something that faces the public that has just a whole slew of names on it.  There's also Dan Langell is working on something called anvil, which is this. If you have complicated let's encrypt needs. It may solve those problems if it but solve that problem as simply as you can. You mentioned or I think it was Ingo who mentioned the C applications that you want to run on your dynamic website. Yes. Do you have any suggestions for running simple, small Python or Lua scripts? It's perfectly, it should be perfectly doable. Get a you're going to need something to run fast CGI protocol. You point the HTTP fast CGI socket configuration at the socket for your fast CGI interpreter. And it should just work. I have not run Python or Lua websites. So I'm sure this is a wonderful group of people to ask during the break though. I learned that the fast CGI argument in HDBD takes a port number as an argument. So instead of a socket, you do colon. That's one way to do Python applications. Okay, I did not know that. Thank you all.


Thank you so much for being interested in my work and in my book. My name is Professor Janna Lipman. I teach U.S. history here at Tulane, and I'm really excited because I just published my new book in camps, Vietnamese refugees, asylum seekers, and repatriates. And this is a project I've been working on for about a decade, and it tells the story of Vietnamese refugees as they left Vietnam, and their experiences in camps in Guam, Malaysia, Hong Kong, and the Philippines. And it really is meant to have us think about why does it matter where refugees land? Does it matter if they land in the Philippines versus Hong Kong? Does it matter when they land, 1975 versus 1989? And what does this mean for the present? And I began thinking about this topic a long time ago now because I came across two really different images. I'll just show them to you quickly. Amazing technology. So this is my new book to show you there in camps. But the image I wanted to talk about is this one. I found this image in the archives now many years ago. And at first, it's not clear what's going on here. This is a group of Vietnamese men who had left Vietnam in 1975. And before coming to the United States, they were all sent to Guam. The vast majority of Vietnamese men came to the United States and resettled. And we have large numbers of Vietnamese in the United States today, many of whom went through Guam in 1975. But a small number of Vietnamese did not want to come to the United States. Instead, they wanted to go back to Vietnam. And to me, this was really curious. I wanted to know what was going on. Why do they want to go back to Vietnam? What was happening? And here we can see them protesting.  They were protesting on hunger strike to go back to Vietnam. And they do go back eventually in October of 1975 and very tragically they're put in reeducation camps in Vietnam, sometimes for years on end. Flash forward about 15 years later in 1990. And I came across images like this one as I was starting to do my research. This is again a Vietnamese in a refugee camp. But unlike in Guam, they're protesting. So again, they're protesting in the refugee camp. And I want to know why? Why are they protesting? And they are protesting because the Hong Kong government wanted to send them back to Vietnam. These Vietnamese did not want to go back to Vietnam. They did not want to be repatriated. Instead, they wanted to come to the United States or Australia or Canada. And yet the images to me raise both lots of questions. What is going on in these camps? Here we have people who are protesting. They're not passive. They are not a political rather they're engaging in political action. Secondly, the things have really changed. In the first image, you had individuals who wanted to go back to Vietnam. Well, in the second image in 1990, you had people who definitely did not want to go back. What had changed over time? And these are the questions that animated my book. And that led me to conduct research in Malaysia, the Philippines, Hong Kong, England, and Southern California in Orange County. I was able to go through all sorts of archives, records from refugee camps. I toured many places that were formerly refugee camps from sort of abandoned buildings to places that are currently parts of the Hong Kong police force, where they still do trainings. And in the end, my book has, I would say, two, maybe three main arguments. First, I argue that refugee status is not fixed. It changes over time. So if someone shows up in 1975, they were automatically a refugee. Well, if someone was able to land in the same spot 10 years later, 15 years later in 1990, they were no longer necessarily a refugee. This really matters when we think about our refugee policy today. Secondly, where someone ends up mattered a lot. I think when we think about refugees, most people think about where people fleeing from, in my case in Vietnam, where are they going to? The United States, Canada, Germany. Where we haven't spent as much time looking as the camps in between, the places in between where these men and women go before they either get resettled or repatriated. In my work, I really argue that it made a huge difference that the politics of Hong Kong or the politics of the Philippines mattered a great deal. For example, the Philippines as a Catholic country under Fernando Marcos, who was a US backed authoritarian leader, wanted to help the United States and be seen as a useful partner. Hong Kong, a British colony, did not feel that compulsion. So had a much harsher policy vis-a-vis the Vietnamese. So where someone's boat ended up or where someone got to made a huge difference and if they were able to be a refugee or not. And I think these local politics matter a great deal because they mattered at the international level as well as at the local level. Finally, activism. I'm very proud of the fact. I don't think I use the word plight of the refugee anywhere in the book. At least I hope not. But in a lot of the literature on refugees, refugees are seen as passive, apolitical, abject, unable to shape their futures, just grateful and thankful for having been saved. And in my research, I show that this really is not generally the case. People leave countries for political reasons. And then in the camps, they engaged in active political protest. Sometimes this was radical, whether it was getting your head shaved and being on a hunger strike to sometimes engaging in acts of violence. Other times it was less radical but still useful and assertive, creating networks in the Vietnamese diaspora communities, in the United States or in England or Australia. Other times writing letters to policymakers and actively lobbying governments or using allies in host countries to lobby governments for better policies. And so I argue and look at the ways in which the individuals in the camps were actively involved in these types of protests and events to improve their status and to get what they wanted, whether it was repatriation in 1975 or mostly afterwards, better conditions in the camps and easier access and refugee status in an English-speaking country. I think my book has lots to tell us about refugee politics today, both the ways in which governments have acted to keep people out, the ways in which governments have turned to camps to deter people, and the ways in which people in the camps and their advocates continue to advocate for better sort of asylum status, for more fairness, for more justice and for more humanity for refugees throughout the world. So thank you very much and my book is called In Camps.


The Court nullifies PDP primary elections in Ogun and orders fresh exercise within 14 days. And INEC decries refusal of the APC, PDP and other parties to submit audited reports. This is Plus Politics. The Federal High Court Abel Kota Ogun State yesterday nullified the governorship primary elections conducted by the People's Democratic Party in the state. The presiding judge, Justice Ogun Tony Ball, in his judgement, ordered the party to conduct another primary within the next 14 days and also barred the Independent National Electoral Commission, INEC, from recognising Ladi Adibutu as governorship candidates of the party in the state. The plaintiff's contender that those on delegates list used by the electoral panel for the primaries were not democratically elected at the ward, local government and state congress. Well, joining us to discuss this is Dr. Sunday Sholari. He is the state secretary of the People's Democratic Party in Ogun State. Mr. Sholari, it's so good to have you join us. Good evening. It's my pleasure. Yes. The last time we spoke about Ogun State PDP and the situation that was taking place, I spoke with one of the governorship candidates or rather aspirants, Mr. Shogumi, and he did say he made a very serious case about how the PDP got its flag bearer. But now the court has ordered for fresh primaries to take place. What is the position of the party? Of course, the party must do what the court is saying. But what are the things that need to be fine-tuned, especially because the case that the plaintiff made was that those who were used as delegates for that election were not necessarily democratically elected. What's the party going to do now? Well, one is surprised that an aspirant of the party could mislead the court by presenting false information. Part of what we were able to deduce from the judgment, though we are still waiting for the satisfactory copy of the judgment, where a lawyer will sit down and take a custody look or detailed look at the judgment in entirety before we have informed opinion about the next line of action to be taken. But however, part of what the judge was mentioning yesterday was that the delegates used West Statute 3 delegates, which is obviously false and outright falsehood. But however, the party is still waiting for the satisfactory copy of the judgment to be made available. We will look at it and then we have two options. One of the options is perhaps to heed the order of the court. And the second option is perhaps to go on appeal. And there's no option we'll take that the party will not be comfortable with. If the primary were heard under a free, fair and transparent process, we shouldn't be afraid to have a repeated occurrence of such free exercise to be conducted. However, like I have said, not until the satisfactory copy is made available, the party will not have an informed position yet to take. And when the certified true copy gets handed to you, I'm asking, I'll ask the same question I asked earlier on. Will the party go as far as the local government to have democratically elected delegates to make sure that this process is free, fair, credible and transparent, even though you're saying that a member of your political party or the two men who actually went to court on this matter seem to have lied on oaths? Is this what you're saying? Yes, obviously, because similar matters have been educated in the Federal High Court of Abuja. And one will believe that Federal High Court is one, not minding the judicial division where pronouncement is made. In July 29, 2022, Justice Taiwatao of Federal High Court of Abuja ruled that the court lacked the reduction to interfere in the internal management of the political party, which of course included who will be the delegate in the primary election of a political party. Justice Taiwatao relied on a lot, I mean, an avalanche of judicial pronouncement by higher court and it arrived at the fact that whether a delegate is correct or not is not just accessible by the court of law and one wonders why such a position has been reversed in this instant judgment. But like I said, however, even if the process is repeated, because let me also admit that the delegate that took part in the primaries were democratically elected and like I said, the court was being misled by saying that they were statutory delegates because the Electoral Act 2022 did not envisage participation of statutory delegates in any primaries whatsoever and this did not happen. But however, whatever the court says, the party being an instrument of the law will obey it. Let's talk about internal democracies within the PDP in Ogong State. When I spoke with one of the plaintiffs, one of the people, members of your political party who was also in the running for the position of the governor, he spoke about the National Working Committee trying to weigh in on this matter, but that the state was not necessarily welcoming that peaceful process. Enlighten us as to how the National Working Committee has waded into this matter because it seems like feathers have been ruffled and so many had agreed within your party in the state. But the National Working Committee of the party did not show any particular interest in the affair of PDP in Ogong State. What the National Working Committee did was to construct primaries in all the states of the federation and Ogong State being inclusive in this process, participated in the exercise, you know, by the time table, you know, given by INEC and the National Working Committee. So there is no any time, you know, in the history, I mean, this process that the National Committee took particular interest to double into this affair. The process was, you know, not interfered with, the primary were conducted, the setup committee to come and conduct primaries in Ogong State and this committee came to Ogong State, conducted the primary, wrote their report, issued their result and then returned it back to the National Working Committee. And one would now wonder why it has become, according to the plaintiff, the responsibility of INEC to satisfy, you know, the result generated from nowhere because the communication between the Commission and the political party is through the National Working Committee. And all the correspondence, you know, put before INEC, by the National Working Committee of the party is what we expect INEC to be. And in this system, INEC actually obeyed it, acknowledged the result of Congresses that were held in Ogong State, you know, affirmed it and, you know, like I said, court must have been misled to pronounce the last document that it did. But we're not afraid. The party is not afraid. The National Working Committee is unperturbed because they were aware that the process took place under a free and fair atmosphere. And if the court, you know, so desires that the process should be, you know, reestablished, why not go ahead, having studied the satisfactory copy of the document that we anticipate to get tomorrow, you know, or any time soon. Even as the court has ordered, what is your party doing at the state level? And I'm talking about your chairman and the members of the executive to deal with those who are grieved. Because again, today is the beginning of campaign season. And for many others in different political parties, they're already strategizing as to how their campaign would go. But then, of course, the People's Democratic Party seems to be faced with this issue. And then you have 14 days in which you have to conduct this primary to make sure that it's fee-free and credible. What moves are you making within the party to make sure that all those who are grieved will be coming together for whoever in support of whoever emerges at the end of the day? Well, frankly speaking, the party is actually not happy that we have to, you know, to get ourselves confronted with unwarranted destruction, perhaps a process that we should have put behind us. We now have reason to begin to look back why we're supposed to be marching forward. But however, this will, of course, not deter us because we have set our eyes on the ball and we have charged all our members to, of course, focus on the common goal, which is the corporate goal of the party that is to win a contraband of government, you know, in the coming election. We have, however, been trying to appeal to those who could not make it to the level of becoming the candidate of the party that is those who fail at the primaries to let us work together. And I can tell you it has been a positive result for a couple of times. We've been receiving the pep talks from other political parties and I can tell you as I'm talking to you now, there is no history or events that took place in the state. We are members of PDP with the camp embers to other political parties. Rather, we have been having members of APC, APM, ADC defecting to PDP because of the semi-unity and the way the party is being managed in Auguste. And I can confirm to you that in the couple of days by the time we will be out of this, you know, deliberate mischief, then we will begin to embark on the same voyage of accepting defectors back into the party. There have been allegations that you're the candidate that the party leadership in your state had accepted as the flag bearer, which whose name was also submitted to INEG, seemed to have been funding the party in a way. Many have said that he seemed to have been sharing money, hence why the party decided to give him the ticket. Do you care to respond to that? Well, I don't know anything about this. Honourable letter to who is the flag bearer of PDP in Nogu State. Yes, no doubt is one of the financier of the party, is the leader of the party. And being a leader, you have to provide leadership in our education. So could that be that because he's a financier of the party, was very comely and easy for the party to give him the ticket as opposed to allowing for free fair and credible elections to happen? Okay. Let me tell you this. This is somebody who had been in the party since 1998. You cannot compare his political network, his acceptability, his penetration within the party with somebody who came to the party barely three or four months ago. They are not incomparable. There is no way somebody with over two decades standing within the party will measure up, you know, with somebody who had not even spent six months in the party. So if you actually want to use, you know, if you actually want the party to service you must have also service the party. It is not a function. So you're addressing my point that the party, since it has been serviced and financed, this is somewhat of a reward system. Hence why he's your preferred candidate. He has a over two decade fraternity with members of the party. My question is a yes or no question. No, that is not. You can't, you can't make that directly to it. This man has suffered in this party, he has represented the party. That is why you want to reward him. Definitely because he desubsid. I was hoping that you would give me that answer. Yes, he desubsid, he desubsid. So is it true that there were, there was no free, fair, incredible election because the party had already decided who they wanted to get that ticket? Because the delegate of the party who supported a candidate that is well known to them. I'm telling you that this person has related with the party for over two decades. So the other candidate who came, came in fact, got into the party with a nomination form. So he was not a member of the party, he does not have history in this party. If he wasn't a member of your party, why let him go through the process of picking up a ticket, going through the whole, you know, the high jump, and then when it was decided that, oh, because this guy has been funding us, let's just give him the ticket. Why, why do you say today that this other guy is not a member of your political party? He hasn't suffered like the other man. Is it about, is our political party supposed to be a reward system of sorts? What about allowing for free, fair, incredible elections so that the people who eventually vote for you can also understand that there is some form of internal democracy? If you can't do that, why should people vote for you? No, where do you put the position of long service?  Whoever just came into the party should be patient. Of course, if he participated in the primary, he could have won if he had been able to get himself well acquainted with delegates who were supposed to vote for him. So this is not a question of somebody. It's a matter of long service. There is no way the party would have made a mistake of nominating somebody who they have not known. You see, we cannot do all the, we have to look at certain criteria. And like I told you, long service, you know, long service and that are able to do the ticket that he got, not because he spent, or he has spent, he will also put his money to it. The party has a principle of free entry and exit. Anybody can join the party at any particular point in time. And you will also be accorded the right and privileges that is also available to somebody who has been in the party from time immemorial. But that now is standing. When it now comes to the mandate of the party, you will not want to give your vehicle to a driver that you are not very sure of his driving skill. And you are not to also quite sure of his ability to navigate the road very well. Finally, just walk with me here. I'm sorry, Mr. Chalari, but just walk with me here. I want to paint a scenario. So you're telling me that, for example, I joined, let's say, the PDP in Ogun State. All I need to do is fund the party, be a longstanding member. Now, my credibility, my ability to deliver on dividends of democracy or even have any form of leadership skills may not matter, but then long services, what is your priority? Help me understand this, please. This can only be established if you have, you know, if you have an endurance history of all of it. There's no way you can establish this factor you have just mentioned by spontaneous action. So it is true observation. It is true your character. It is true your steadiness. It is true your emotional stability and your ability to have been identified with the party during the time of trouble. So it is not sufficient for us to say that somebody who just came and you have not been able to examine him, you do not have his history and you will now say, okay, let us now ask this person because for example, like I just gave an analogy, you cannot give your vehicle to a driver that you are not sure of his driving skill and you are not sure of his ability to navigate the road. And you can only know this via the experience that you have. And experience is what we have been talking about. We now have a candidate who has not even had an experience or is an history of one month standing in the party. You know, PDP is a major political party and political leaders will not take such gamble. He has never stood for any election once. I mean let alone winning one. So we also have to look at the political marketability of the candidate of the party because that is going to be the image of the party and the outer ego of the party during election. So we have to consider a lot of factors. And when you now look at all of this, I can tell you that on a ladder they will stand so that high, more than any other person. And let me say this, one of the reason why the party has stood there is that this man has an history of over three decade consecutive habitation in Auguste. He has dwelled wine and dine with people of Auguste. They know him and they can entrust into his hand their mandate. So we have looked at all of this and because of course within the party and outside the party he has the widest political network that the party can leverage on to win election. Well we're looking forward to of course the 14-day ultimatum that the court has given to the party and what comes off it. We'll be watching and we wish you all the best of luck. Hopefully you'll come back to us and give us feedback on what happened. Thank you very much. It's my pleasure to be with you. All right. Dr. Sande Shallari is the state secretary of the People's Democratic Party in Auguste. We'll take a quick break when we return. We'll be talking about the refusal of political parties to submit audited reports to INEC. Now INEC obviously is worried about this. Thank you very much.


how in pre-classes and worksheets there's going to be sort of a lot of isolated techniques and sort of formulas to remember and sort of the whole point of the rest of the semester is going to be at least in classes when we're not talking about projects to try to capture these in some unified framework where we don't have to memorize so much, right? If you go and pull up Google and look for like trig identities, you'll see just like a million of them listed out and our goal in mathematics is not to memorize, you know, a bunch of formulas like we want the the processes and so the processes that sort of govern and sort of the processes you could use to derive these things and then sort of a few basic principles you can just derive everything from. So this is like a technique in math that goes back to Greek era like Euclid, you know, he sets up geometry with four or five axioms and then deduces all of these theorems about them and so like the core principles, the axioms are the important thing and then the processes used to get all of the results are important and like somehow just memorizing all of the results isn't like not the end game. Yeah so just with that being said the stuff I'm going to be talking about is going to be slightly different in terms of notation and phrasing and the stuff that you're looking at, you know, in the videos and pre-classes but hopefully it helps tie it together. So yeah today we'll talk a little bit about what's in those and then we'll talk about the project. So the first thing to say a little bit about something we have sort of already looked at, centric functions as geometric ratios not rations ratios. So the idea here is that we, so we've chosen some coordinate system as usual, we have this like y hat direction, we have this x hat direction. The way I like to think of this is this is like a frame of reference if you're doing you know something like physics then you know it kind of depends on where you like what reference frame you're looking at. So I could go out and draw this and chalk on the sidewalk and I'm just arbitrarily chosen here's the place to put the origin but the point is that you know we make this choice sort of arbitrarily but all the geometry we can do won't won't really depend on that choice. So we have a spot that we're just calling the origin no and let's just say we're given some angle theta and we remember that this determines a ray until we right so this thing starts at the origin just shoots off to infinity and let's say we also choose a radius if we've chosen a radius then this normally this would just continue off otherwise but if we choose some radius R then we get a well defined honest point in the plane and so this is kind of the idea behind polar coordinates that you can specify you know something in the plane like the plane is two-dimensional right you have sort of two directions you've chosen the x hat and y hat so somehow you need two pieces of information to tell you about where you are in the plane how far are you along the x hat direction and how far are you along the y hat direction but it's also equally good if I just tell you so that would be like an x and a y it's also equally good if I tell you just start at the origin turn in some direction and go x or go r many feet in that direction then you can still sort of get to that point and I want to point out the thing to sort of this sort of a picture to keep in mind here and switch over to it this is kind of the thing just to convince you that every point in the plane can sort of be specified in this way so here is sort of you haven't so you're in the x and the y plane but you're specifying an r and a theta so it's kind of like you're standing at the origin you're casting out a little ray in some direction and then you're asking go our units along that ray and I just want to convince you that it's plausible that you could hit every single point in the plane this way because if you shrink r and grow r you could make this sort of anything along that ray you want and then if you vary theta you can sweep out a little circle you know this from zero to two pi so you can hit everything there and if you just make the radius a little bit bigger you can hit everything there so you can kind of it's not really approved for anything like that but you can hopefully convince yourself that you can get every point in the plane this way okay so we get some point call it P with the vector symbol on it because we're thinking of this kind of as an oriented it's something that starts at the origin and goes to that point we're just kind of arbitrarily making that choice and this is getting into the idea that we're now thinking of these not it just points in the plane but vectors something as a you know it's an arrow it's just in the plane it has a magnitude r you know a length and it has a direction theta and maybe well theta or this P really depends on theta and it kind of depends on r as well since we saw in that picture if I vary P and theta I get different actual points that ends up on sorry if I vary theta and r so the point here is that you can sort of do a natural geometric operation here we can drop a perpendicular line to the x-axis it's just forming a right triangle there and we can think we can have you can take this angle and we can think about an adjacent side we can think about an opposite side and I pot noose so formed by this triangle this is hopefully familiar nothing too new here but the the new piece of information is that if I give you a point in the plane or in polar coordinates I don't specify anything else you can always just extract a natural triangle out of it in this way and so you can think of things like sine of theta I want to right here sine of theta in this case will always be opposite over bot noose cosine of theta it's the adjacent over the bot noose tangent of theta I guess this one is so it's sine over cosines the H is cancel and you can over a this is for those that haven't seen it before there's this like so katoa thing to help remember these and then if you do there's all these co-things there's it's always hard to remember which one goes with which so I think it's cosecant goes with sine secant goes with cosine and cotangent just matches up directly and the way you remember these is you just take I guess is an important thing I'm leaving out here so there's kind of a warning the thing to remember here it's going to be pretty important later is that there is this symbol kind of floating around this sine inverse and so I'll tell you what that's actually defined to be it's defined to be this arc sine function of theta so this is a place where notation can be kind of confusing because we use this to the negative one power to indicate taking a reciprocal like exponentiating something for trig functions and specifically for trig functions this notation indicates like an inverse function so you maybe talked a little bit about a lot of different types of inverses you can have inverses that are like multiplicative inverses where you multiply them together and they cancel and that's like a reciprocal you can have functional inverses which we kind of looked at in I guess unit two right where you kind of compose them together and they cancel it's like exponential and log or functional inverses but these are generally two different two different things and so what I will write in general like if I'm doing something like you know just say here sine inverse of theta is not equal to one over the sine of theta and so this is a big caveat and how might you remember this well the only reason we kind of get away with this kind of weird notation is that we already have a name for one over sine of theta which is go see again right it's literally just this thing here and so that's that's at least one way to remember remember that so I'll just move this over a little bit and then similarly this sky is one over cosine of theta and if you want this is one over tangent of theta and so you know to get these these ratios you're just flipping the orders that you see on the left-hand side taking reciprocals to be more precise okay and then for these if you want there's another sort of mnemonic device and I don't know how you would even begin to pronounce this mucosa cow chaos of you like that just something silly to help you remember like which which order you need to take these ratios and then the point is here is that you can actually do this with any point in the plane you can ask about at least geometrically this is something that sort of scales out with the triangle so like we are restricted to the unit circle necessarily if we know all of the sides of this triangle so like if we knew this p bar point in terms of x and y coordinates then we could figure out what these side lengths are and we could just take these ratios and that'll give us a way to compute sine of theta but right if we if we just know theta this is going to be a little bit of a problem so this is kind of a problem that just having theta isn't enough this really is kind of an important idea that this this data is only determining a ray so we can't really make one I'm just kind of going back up to this picture here we can't really make one triangle to try and take these ratios so you have to sort of pick you know like a convention to go with pick one triangle if you want to just define so I guess this is the problem of given you know theta what is say just sine of theta and so the way you solve this problem is that if you're just given the angle you pick a special radius just a radius of one and so you end up with a picture see something like this this is supposed to be kind of an analog of the picture up there you have a y hat you have an x hat this thing is now the unit circle this is a radius of one you just remember that if you pick some theta and you cast a ray out to infinity like that then all I'm saying is that well you didn't choose an R but you can choose a very special R like R equals one and you can ask about this point where it intersects this is like a totally geometric way to define what the sine of an angle is if we don't know things like sign links where you don't have a triangle lying around so we know that this will be some p bar depending on theta we've kind of picked a special R equals one and through some geometric principles this will be an x y coordinates cosine of theta and sine of theta and really I could have sorry keep scrolling back and forth but if I go back up to this picture here I could have also noted that in polar coordinates this is given in the x coordinate it really is our cosine of theta and our sine of theta and so this is really just a special case we've taken R equals one so I'm trying to like fit this all in there if I can so this is essentially how you would define sine of theta cosine of theta cast a ray at that that angle go out and look for where it intersects the unit circle and then just take the x and y coordinates of that thing okay so I want to do a slightly bigger version of this picture so we can talk about the components of this thing well maybe let me do this let's kind of zoom in on like just this part here and look at this situation we have something like this and we were intersecting some unit circle at this point right so this is literally just taking that picture above and we're just kind of zooming in on the first quadrant we still have this angle theta we still have this direction y hat in this direction x hat and this p bar actually let's do it this way let's say that you were say that this thing is the unit circle and this thing is just an arbitrary circle of radius R so right we have this this ray determined by theta and it you know keeps going off to infinity and we know that in polar coordinates this thing is given by it's called this p bar zero and this p bar one this one was just cosine of theta sine of theta and this one is kind of a scaled up version of that our cosine theta our sine of theta and let me shrink these down a little bit so we have some room to work now that didn't go well okay so what I want to ask at this point so if I have polar coordinates for a point maybe off to the side here oh so recall that we have this there is an addition for vectors so anytime I have two of these vectors and the way to kind of remember it is tail to tip these are purely geometric objects in the plane and I'm just defining something I'm calling addition so it's some weird operation it's nothing like addition for real numbers we're now adding two geometric objects but there are good good reasons to you know it shares enough properties of addition that it's useful to call it that and the way it works is that if you have one arrow like this and another arrow like that and this I'm not going to be able to record in the notes I have to just kind of do it in real time here the way you add these things is you just right and so you're in some coordinate system you've chosen these are just two random arrows they could be anywhere sitting around in in space you can kind of pick one up the one you want to add you move it so the tail of this arrow is at the tip of that arrow and the resulting arrow you get starts at the bottom of the first one and ends at the top of the second one so if this was a and this was b and the thing in red is the thing we're just calling a plus b that's just an aside so what we want to do here is kind of reverse this process we're given some arbitrary vector and we want to break it into components and we'll see that this comes up in the project oh well probably I won't say too much about it now but if you're thinking about things coming from physics you know maybe if you're working against gravity or something then you're moving in some some vector some direction three-dimensional space now and somehow you know only the force that's pointing straight down really matters so somehow you have a vector but you want to decompose it into like which part of the vector is pointing down which part of the vector is pointing sideways that kind of thing so that way you can you know determine which ones influence like a calculation you're doing and which ones are kind of orthogonal to it and not contributing on the project we'll see this because you'll have this leaf pointing up you'll have a light ray coming in at some angle a kind of the only contribution of the light ray to the energy going into the leaf is the contribution that's going straight down so you decompose this light ray coming in at some angle into like a proportion that's coming in straight down and a proportion that's coming in sideways so it may not make too much sense now but hopefully it will as as you spend more time with the project so the way what I want to do with this vector here is decompose it into two things I want to decompose it into kind of one piece along the x-hat direction and one piece along the y-hat direction so in other words I want to use this kind of vector addition law that I have to get some vector down here and okay there's not great notation for this so let's call so this p-bar was actually the point out there let's call v-bar this vector starting at the origin and ending at that point so we can kind of go back and forth and I didn't identify one in the other but they're kind of two different things really one of them is just a point in the plane but we know we can always just get a vector from it by connecting the origin to it so we have some vector v we want to get some component v you know just put v sub x so this is just like what is the horizontal component of this if I want to get to that point how far you know east do I have to go if I'm just walking directly east and I want to get a vertical component like this this would be something pointing that way I think of this as like a v-bar sub y so some vertical component that gets me to that and the name of the game is going to be and I want v-bar as vectors where we're not thinking of this like vector addition law to be v-bar in the x-direction plus v-bar to the y-direction so the x component or the y component of this vector and right this is this is just coming from the geometric picture I notice that if I add the red and the blue and do the tail to tip thing I start at the the the origin is kind of the the entry point of the first vector I follow it along I go all the way up to the end of the second vector and I end up at the point I want so this is satisfied by these geometrically and the question is how do you actually get formulas for these things and actually it ends up being not too difficult really this idea of polar coordinates does a lot of work for us it's really the most most useful concept to to know here so there's actually a way we can just write down v-bar of x okay so a vector right it has to be something that starts with the origin here we wanted to end at this point here so really this is just saying it's what point are we going to end at well we aren't going to go any we're not going to travel any distance in the y-direction we're just going to stay completely level and how far out are we going to go well we're just going to go out exactly our cosine of theta units or in other words if you like this b-bar was just equal to some point x y and so this point down here is just x zero and so that's that's all we're really doing is we're just picking off the the x component of this vector b-bar y so fortunately a similar formula works but it's harder to kind of see why so the idea is well now we're starting at this x zero point down here and we want to get to the point that we want eventually so what do I need to add to it well I don't want to travel anymore in the horizontal direction but I need to travel some some units of y vertically and so I just need to go r sine of theta units up and this is a little bit confusing we think because this point you know it's not zero r sine of theta it's our cosine of theta r sine of theta so like how does this v sub y here correspond to this v sub y we had and the kind of magic of vectors sorry my cat's in the way the magic of vectors is that we have this in physics you might call it like a superposition principle where you can kind of move them around freely so a vector is determined by its magnitude and its direction but it doesn't really matter where you kind of place the the base of the vector which means that we can kind of pick this whole thing up by a copy of it and I can just move this around the plane freely and it's still the same same vector so one thing I can freely do is move it to a very nice place like the origin and this is literally literally the same vector so this is a little bit tricky right because it's not it's not actually the same line segment at all right they start and end at two totally different places but in this this framework of vectors we're allowed this freedom to kind of translate these vectors all around and what happens here is that it's actually this point is zero r sine of theta or if you want just zero y whereas this thing was x zero and so you can kind of trace this over and even if you want sorry this diagram is going to get pretty busy in a second but you can also just move this up here get a copy of that vector right so there so I've kind of two paths of getting to this point one of them is more useful to figure out the x coordinate one of them was more useful to figure out the y coordinate but you can see just geometrically if I add both of those vectors it kind of doesn't matter which which one I I do if I go around the bottom part of the square I'm still ending up at my destination I go through the top of the square I'm ending up there too and that's just following the this like vector addition law okay so and I will post these notes up later for whatever you know so you can use them as as a reference if you need but what I want to say here is like the takeaway from this is that we can break vectors up into components this is a technical term and the the kind of heuristic or the slogan you want to keep in mind slogan is cosine kind of looks like the x component you can also think of this as like a direction if you want in which case this would be an x hat sign kind of corresponds to the y component okay and we'll just say one sort of nice thing that falls out of this really nice or sort of really easily just do a quick sketch for this one here we're just going to be on the unit circle here are our directions way ahead x hat so I'm drawing this kind of picture a lot because for a lot of these problems this is you know the picture you want to draw um you just think about casting array some angle theta let's ask ourselves this is r equals one if we go to this point it's a polar coordinates is telling us sort of sorry cosine corresponds to the x component sine corresponds to the y component and r is just one so those are literally cosine and sine and so this the length of this vector here is r and so one really nice thing that comes out of this is that um if you just do drop this perpendicular make this triangle you have a right triangle here where the length of this let me just do it this way so there's an a there's an o and an h so these are just lengths of those sides the length of a from that previous discussion or is just the x component of this vector so it really just is cosine of theta okay and the length of that vertical component is the sine of theta and we know fortunately Pythagoras did a lot of work for us that o squared plus a squared equals h squared and I guess we also know that h is equal to r is equal to one in this case so one nice thing we can conclude here is that while I have another name for o it's cosine of theta squared plus I'm sorry I guess I put these in the wrong order so that's that's a um and then here I have sine of theta and I square that whole quantity it's equal to h squared which was just one and I mean it's a and then notation you've probably seen we put the two on the cosine squared of theta it's just equal to one and so this is like the fundamental trig identity and so this just comes out of so this is like some combination of the Pythagorean theorem and the fact that um if you're on the unit circle and you just take polar coordinates of your points the x component and the y component literally just our cosine theta and sine of theta and then I just wanted to point out something here too just kind of be careful about these two notations maybe I just put a warning over here just to remember that well maybe this is the one to be more concerned about if you have this two over the cosine there it's a little bit confusing because this is like also where we put the negative one when we're indicating um you know like the functional inverse so you can't really these these mean two totally different things so the way I would get around that is just try to try to use try to use this um notation if you can it's a cosine of theta so number one is that theta is always a function so use uh perens to to close the argument up so you know like what are you actually taking cosine of and then two is just put the whole thing in perens and just say say exactly what you're squaring um this kind of gets rid of any ambiguity about what could possibly be happening versus something like cosine of squared of theta or something like that so that's not not great notation because it's not clear like if you had other stuff coming after this like plus three are you taking cosine of theta and then adding three are you taking cosine of theta plus three yeah so you definitely use those and stick with these notations of arc sine versus sine inverse I think this is just an easier way to way to go just so that way there's no ambiguity at all you can sort of just put an arc in front of it and the arc is just indicating it is the inverse function of whatever you're you're asking so you could do your arc tan the arc tangent arc cosecant you know kind of anything you want but the arc is a little bit nicer than the negative one okay thanks yeah we got to say something about the project so let me pull up where see how far we got last time um maybe it is helpful first to look at some pictures so let me just pull those in rather than redrawing these I found some nicer diagrams online to kind of say what's going on a little bit nicer um sorry if you remember the sort of premise of this project is actually maybe maybe it's even better to see I have a different visualization first this thing is probably the one I want yeah okay so the setup for it was that okay we're thinking about the sun orbiting the earth you know maybe the earth maybe this is this sphere here that uh we're on and we're thinking about a little point on the earth and a little leaf and we're trying to ask questions about how much energy sunlight leaves photosynthesize they convert light energy into chemical energy and we want to ask some questions about like how much energy are they absorbing if we somehow know the energy output of the sun and so this is kind of a geometric problem because it depends on a lot of things like namely the angle that sort of the rays are coming in from the sun and hitting the leaf and also kind of what angle is the leaf at it'll depend on some other factors like what is the area of this leaf um what is so I guess we're calling we're going to call it the energy density output of the sun so it's going to be some number of like some wattage is how we'll measure power but it would be wattage per centimeter squared so like some this is a you know a density so that way we can scale it up by the area and so this is kind of the situation we'll have is that we know that there's a periodic nature to the orbit of the sun or even just I guess sorry there's a periodic nature to the orbit of the earth around the sun so I guess this picture is a little bit backwards for this visualization anyways but we know that say if I'm just fixing myself to be you know this point on the sphere just because of the way that this rotation is happening I'm going to go from light to dark and then back to light and it's going to follow some kind of periodic pattern where the period will be 24 hours right as the earth just spins and so you can imagine you know if you're just looking at this little square of light being bounced off of the sphere here this is the brightness of that square is indicating somehow the the amount of energy hitting that spot you know if a lot of it is reflecting off and the reflection is going to be really bright and this is exactly the same thing as you know a little leafing you know absorbing a lot of energy we're just displaying it as a reflection here and so you can see that kind of as the you know if the sun's kind of way off at an angle you're getting kind of less light if the sun's like directly pointing towards it then you're getting a lot of light and if the sun's you know somewhere off behind it then there's no light at all to bounce okay so we're going to try and simplify that situation and analyze a little bit about what's going on so the way we'll we'll model it is that we'll take this light source to be the sun we'll consider let's draw it in orange this point here this will be our leaf and we're going to model our leaf as like a little plane or really if we're looking at it from the side just a little line and this is kind of the geometric setup we have is that this L is indicating that's a little bit weird because the light is coming into it but we can sort of indicate it as a vector in either direction just kind of flipping the direction so it's kind of more convenient in this picture to make it point out back towards the sun and we we're going to have a leaf with some orientation to it and that's kind of determined by this end this end just always sticks out of the plane of the leaf so if you can tilt the leaf a little bit this end tilts it some direction and we don't have to worry about these two this is more for a reflection that kind of thing which we don't have to worry about here but what we're most concerned about is this angle here um you call it theta one in this angle here theta two sorry I think I've labeled these backwards in my notes so let me just call this one one and this one two put a one there two there okay so theta one is measuring it's kind of like forget about the leaf entirely just kind of fix the plane that the leaf is on and ask yourself where is the sun along its orbit like what um what angle is it making with the ground so that's going to be one piece of this puzzle just like what angle is the light source at from your measuring place theta two is kind of the one we're ultimately after because this is going to determine how much energy is absorbed the idea being that if if theta two was equal to zero then this light vector and the way the leaf is pointing would be totally aligned and this would essentially mean that the like it's like 12 noon or something the the sun is directly above your head all of the light rays are kind of hitting the leaf in a maximal way I mean it's absorbing the most energy whereas if you kind of tilt it off to the side the light source is kind of way down off to the left and all of these rays are coming in parallel and like none of them are hitting the leaf the light's absorbing no energy so both of these um will sort of matter for us here and what's what's happening here let's see if I have a good way so I guess I'll just draw this it is we have this little plane that the leaf is on has this kind of normal vector sticking out and we're thinking about this in a very simplified way by kind of rotating this and just looking at it from the side has this is just one simplification like this was the leaf or at least like one tiny little square on the leaf this was our vector and that and before we had some light ray coming in sort of like that really a bunch of them but we'll kind of move them all so they're coming in the same direction and the way we'll simplify here is let me just put it from this side so it's a little bit easier to reconcile with our previous drawings so it's just whatever um let's see what we call this l I'm sorry I realized the coloring is not matching up so well here okay but you can't see that okay green green will be all for us um so the way we'll simplify this is that we'll flip the direction of this like that and we have this as we call this bottom one theta one this top one theta two and actually I think I want to make this slightly uh bigger the sort of key principle that we'll be using is that once we kind of fix the coordinate system now we're kind of in a two-dimensional world so we can fix an x hat and a y hat and we'll pick an origin namely to be this point here this is kind of like we're now setting up a little reference frame this is where our leaf was sitting at the origin and we had some vector coming out like this this is our light vector and we had uh sorry we do it in a different color so now that the the end vector so kind of the orientation of our leaf is pointing straight up so it's kind of lined up with the y direction for us sorry I just want to make this a little bit smaller okay and here's our theta one here's our theta two okay the the first principle that's going to be important here is that there's going to be an energy density um well maybe I'll just say what it is first and then I'll explain what the picture why it should vary um so this energy density is actually going to depend on this light vector so it's like a function it takes in the light vector and I'm not going to say what the actual formula is I'm just telling you some proportionality relationship between them and what is it proportional to I'm going to use some kind of weird notation but I'll explain what it means okay so l sub y is when we do this decomposition into two pieces we get one vector like this which is an l sub x and we get one vector like this which is an l sub y okay so we've broken it down into what is the horizontal component the l sub x and what is the vertical component l sub y and l sub y is the component that's kind of lining up with the leaf because we've chosen the coordinate system that way and with this kind of funny two bracket two lines on the end this is saying the magnitude of that vector or the the norm of that vector or if you want to think of it as just the length that's totally fine but it's saying that as this so this this green vector l right this is the light vector sitting at the origin now and now you're imagining this vector over time this is essentially pointing to where the sun's coming from so it's going to start at zero and it's going to just kind of run through a rotation right it's just like zero to pi and then it's going to you know be on the other side of the planet or whatever and you're not going to see it and then eventually at the next day 24 hours later it's going to start that again it's going to be at zero and then sorry start rotating through this again so the thing to keep in mind is that if you're completely horizontal then this l sub y that you're seeing is not going to appear or rather it's going to be like a vector with like zero if you're kind of way down here early in the morning then this vector is really short all right and if you're up here in the middle then the vector has some like moderate length if you're at like a 12 noon or something pointing straight up then this vector is probably as long as it can be again we're just looking at the l sub y component of it so in other words like the height of this this point over time kind of imagine that this point travels along a little circle and it kind of gets to a maximum height at noon and then kind of keeps traveling you know this as the day varies and so the principle here is that the this energy density is going to vary and I should tell you kind of what the energy density means this is kind of hard to deduce from the handout so I have a picture for that hopefully okay this is something I pulled from a tutorial online um so yeah the star here is supposed to be the sun but the blue thing is supposed to be our leaf the red thing is the the orientation of the leaf the normal vector pointing out of it um and what's happening here is like in the top picture you can see that as these things are lined up you have a light it's kind of like it's coming out in a ray and you want to ask yourself like this is just some fixed ray um with some like fixed amount of energy and so what's happening is that ray is like hitting a smaller spot with the same amount of energy in the first picture versus the second picture you have the same amount of energy but it's kind of spread out over a bigger area because you're at this angle and you can see kind of how this ray is intersecting your your little square um so this is like small area versus bigger area and these two are just like some fixed amount of energy and so all I'm really saying with this proportionality relationship above is that whatever this energy density is it's going to have to depend on the component of this vector that's that's flying perpendicular to the sun or in other words like where are you on this picture like is it is this vector completely lined up with the direction of the sun so you can imagine that there's um let's see I guess we've done it in green here there's like a green vector coming directly down out of the middle of this and in the first case these vectors are like directly lined up and so that's saying that like the y component is maximal in the second case they're kind of a skew so like the y component is somewhat less and then like I said if you go off to um an angle of I guess pi or something like that it's it's not hitting it at all okay so the thing to remember here is like only the y component contributes and so the first goal is going to be find a function maybe find functions for the norm of l sub y and maybe what it'll be so we looked at this picture we had theta one and theta two and I think what you maybe want we'll want to do is start with first finding f of theta sub one equals dot dot something g of theta sub two equals something and what do I mean by this I mean that you have to kind of go back to the geometry of this picture um and ask yourself if I'm given this light vector and let's say I'm given this theta sub one how do I compute the length here so I claim that you have enough and just what we've talked about today to actually figure this out now it's just it's a little abstract so you have to kind of spend some time um and thinking about vectors maybe reading up a little bit about them on Wikipedia and kind of getting used to working with them um but maybe I'll just show you what it is for theta one and I'll leave it to you guys to figure out how to get a similar formula for theta two right because eventually what we this is kind of the the goal that we really want is we really want a formula for this energy density um but we can start off by just making it a form of formula involving the angle so I'll show it for theta one so we'll need to carry around this picture this is really important and this kind of analysis like we always always need a reference picture for this kind of thing so what I'll do is I'll I'll simplify this picture a little bit because I'm just thinking about theta sub one make something large and in this case I have something like that I have a y hat direction and an x hat direction and let's just say like we're not even in the case of above let's just say we're well might as well just do it so you have this this vector l bar and we want to find what is this decomposition um what is the yl bar sub x well what we can do is you can write the simpler coordinates just like above r cosine sorry I forgot to mark this was theta one r cosine of theta one r sine of theta one again the key key thing to remember here is that cosines kind of correspond to x's y's correspond to uh sines and what we'll do is you can actually there's an important assumption here as we can assume r equals one the reason we can do this is because later on so right now we just kind of want a direction that it points and later on we can multiply in um to kind of scale it up to whatever we need so as long as we have a direction then um we're kind of in business so there's some vector like this and there's nothing too crazy here happening I promise but this is definitely a definite derivation you'll want to sort of explain a little bit in the project this is exactly what we did before we decomposed it into an x and a y direction this is some v bar I'm sorry I guess we're calling it l um l sub x and then in blue l sub y and I know that if l bar is equal to r cosine of theta one r sine theta one well guess what I can just copy this since we have one minute left here try to speed through the rest of this and if we want to take the x component well delete the y component we only want to go in the x direction if we want to take the y component well delete the x one we only want to go in the y direction and so this is the one that we want here and now you just need to know one other thing that if we have v bar is equal to a point x y then this norm of v bar well it's really just exactly the Pythagorean theorem for this thing that's all the norm really is just kind of fancy notation for it and what it is let me just draw a picture here so if you have some vector v bar then this length is norm of v and so the way you compute this length is you take x squared plus y squared and you take the square root just because if this was x y then this would be a length of x and this would be a length of y so nothing too nothing too fancy there and so if you want to take the the norm of this how y well I just need to take the square root of something what is the something I need to take the square root of 0 squared plus I guess I can go back we we made this nice assumption that r was equal to 1 so we can delete all of these r's and that sine of theta squared and I'm lucky for us it simplifies to something really nice it's just the sine of theta and so the conclusion is that this energy density which depended on in this case the light factor is proportional to I'm sorry this is sine of theta one everywhere sine of theta one where again theta one was this angle that the light vector made with the ground so there's still some analysis you have to do with how does that depend on this other angle theta two and I claim that you can just use some centrifugometry stuff from class to relate these but that's what you want to start looking at trying to derive these formulas and I think that's pretty much it for today all right