Welcome to the network engineering video blog. I am your host Michael Crane. Okay, so in today's video We are going to be It well, if you remember if you remember previously When we added a router or a switch Oops switch We basically just got these generic router underscore zero router underscore one switch underscore two And test that was kind of generic to just test that three and these are actually Identifiers that I use to sort the nodes in in a collection of nodes okay, and They don't really mean anything to anyone and and so today in our We want to be able to change these to some meaningful names for the user But still keep these for sorting so we're going to add a new field And I think I kind of touched on it in the last video and that is well Let's just go edit it so we did create an editor previously right you go into configuration and view and And if you remember it dumped out a lot more stuff It was everything basically in this it would dump out everything basically in this class node properties Okay, so it dump out the index a category the make model host name and this label nickname now if you remember we these two Weren't really Implemented yet. All right. They were just there and And we what we want to do today is we want to make this nickname What the user gets to see right here, right? So You know, you don't want to put the Host name in there because sometimes a host name, especially if it's a fully qualified domain name or FQDN It can be quite lengthy and and most of the time people now say, you know, okay Go to the Dallas switch or the Dallas Gateway or the Dallas, you know, whatever the New York Gateway New York Gateway 1 New York Gateway 2 that sort of thing and people know right and that that's what we want to put here So that's what we're that's what we did. I'm gonna do a diff on the just like in the previous videos I'll do a diff. I'm also gonna clean up these names Right here and I don't know. I might show you that another video We'll see how long this video is but we what we definitely want to in this video a look at changing this This label right here, right from router underscore zero, which is The actual name of the router in Mogwai to you know, something more meaningful. Okay, so yeah, let's get started Okay, so I just went ahead. I'm gonna do a diff on these files I don't really know where to start So I'm just gonna start from the top first thing on the top of our diff list here is the class node properties That seemed as logical a place to start as any and you'll see a lot of red the red on the left and the green on the right Red means removed green means added. Don't let that scare you. I didn't change a lot I just rearranged a bunch of stuff and Well, I deleted this comment down here. That was left for from a previous video. We don't need it any longer Let's see. Yeah, I kind of rearrange things a little bit. So so index category and make All kind of left the same model Isn't the same spot But then on the bottom I added host name and nickname and I did this for sorting So I I knew where these things were sorted So and so I removed this left and top property and just moved it up to the top and I added a Comment saying this is the location for the XY coordinates And I left in top and this is no data down here and then down here is as a Needed for the sorting part. I don't know if we'll do the sorting in this video But anyway, I'll show it to you anyway might be here a little redundant But anyway, so this this bottom part be view and be view edit or be edit be view and be edit Are just a raise of strings and that's to tell I guess I can read to you So it's our raise of strings that are our raise of strings that set the attributes for the public property keys above See, it's either gonna set to none view only or view edit or none view only or view edit and Basically, it's like attributes if you're familiar with I guess any operating system But we're just what we're doing is as I'm saying, okay category and make We want we want the user to be able to see them, but we don't want them to edit them, right and then edit Of course, you have to be able to see it. So it's automatically The be view setting but we want them to be able to change the host name the nickname and the model, okay So when we pull up our router, we can change the model the host name and nickname But we can't change the mate Because if you remember when we add them we add them as a Cisco router or juniper router switch or those that sort of thing So we want and and there's reasons why we did that, you know for the different ways they Log in dumb and they have different properties and that sort of thing and and I don't know We might make it more generic later on but right now we're just gonna leave it the way it is So so we don't want them to change the make but they can change the model All right. So if it's a Cisco 3845 or 2845 or something like that or 2811 I mean then and they'll be able to change it, right? So that's the That's the class node properties. I Don't know what's changed in the project probably nothing that I can think of. Let's go into the mod.io here this is a module that that is global and scope and it has a bunch of global variables and and public, you know global Routines that are used by different different classes, right? So instead of copying pasting the same Subroutine I just use this module. I think I've explained that in the past and I think the only difference is oh Yeah, so I added this function this as you can see there's no red. So there's nothing to look at on that side Yeah, so I just added this function for For a get nodes properties get node properties attributes. Yeah, you just said say what key you're looking for and In the node Okay, and this is pretty straightforward. It's just saying if the property contains this key and the attribute Oh, if they So in the properties list it's looking in those those two arrays and it's it's either It finds it in the edit list and it's view edit that finds it in the view list It's view only and that's it and nothing to that Subroutine pretty simple added a public property here. So we can pass it around Oh, this is actually added it to our class key value pair. Yeah, so so now it's more than just a key value pair It's a key value pair with an attribute All right, and I'm not you know I kind of poked around on this thing and I said you know There's there's probably a more elegant solution than making this attribute But I couldn't find it I kind of poked around and googled for about I don't know 30 40 minutes or something like that I I didn't really see anything that looked You know fairly easy to implement and actually I didn't find anything that that looked really good So I just kind of put this in there Yeah, if anyone knows a better way to do these attributes on these key value pairs, you know If I want them to you know, of course the key needs to be read only the value needs to be read only or editable, right? and There's probably a better way than just adding a third property But I didn't see anything when I was googling around I couldn't think of anything so I just added this Okay, so third on the list is node edit config and Maybe I should I was thinking about this before I got started is Is maybe I should show you okay, so this is the main GUI All right, and then If we add a node, I mean this a router or switcher or Or test set is considered a node if I If I let's click on it I'm sorry right click on it and then it edit This is the the node editor or node edit Main let's see where is it node edit home? Sorry and it's also got a node editor XAML. I Forget what that one is. Oh, yeah, this is nothing. Yes. So node edit home is the main one, right? That's that's this window right here, and I'm just kind of running through this so you know What where we're what we're talking about there's a lot of node edits in this video. Okay, so this node edit home And then you click on configuration and view Now this is the node config so node edit config and this is what we're looking at right here, right? Okay, the clear is mud All right, so So we're at node edit config. Let's see here. I In the class node properties, there we go Diff node edit config. Okay, here we go. Okay, so this is node edit config dot xAML. This is the xAML portion of it There are a few changes in this guy. So the first change is what we changed that label It's hard for me to diff this and run the program at the same time. So let me make a screen cap. I'll be right back Okay, I'm back Okay, so we changed this this data template the value and I didn't we didn't change the The name and if you're wondering what that is. So this is the name side right here. I know that the cursor kind of went away. I maybe I can do this and Then here's the the value side. Okay, and And so the What we're doing right here is we're changing the the label Changing from label to a text box. We're keeping the same bindings But I'm making it read only to kind of behave like a A label right because we don't want them to click on it and be able to edit it in there And the reason why is I want to use I wanted the user to be able to right click and And pull up this context menu that we added and this this context menu does a couple things One when you right click on it it sends an event to the node edit config visual basic code behind And and it and it checks the the read write Or I'm sorry the view edit Attribute to see if if we can edit it And we can look at that here in a sec and it'll either pop up this edit or it will pop or I think it'll pop it up Either way this I guess might as well run it and look right so edit Fig So when you right click on it. Yeah pulls up edit and I think it pulls it up Yeah on any of them, right? So it doesn't do that check at this point the code behind doesn't check the uh view edit property or attribute at this point, but I So like if on the make if we click edit. Whoops edit Okay, that's uh Isn't that interesting what happened to my uh my pop up? Oh Well, oh You know, this is this is kind of goofy. So Let me see if I can click let me show you this is and I don't know how to fix this so check this out So okay, I click on edit right and config right And so nothing I haven't highlighted anything so I come up here with my cursor And I right click and now you can kind of see You know it it knows I'm right clicking on this value and I hit edit But it does nothing and it's because Well, I don't know see down here. It says no config name equals Yeah, so it doesn't work. So if I left click on On any of these right if I left click on this and it highlights the whole Name value pair then when I right click on it and it edit It pops it up. Anyway, I digress. I'm not sure why it does that it's kind of goofy and And I it's we'll probably have to fix it in the next video So, uh, yeah, so it's not doing the check the view edit check or attribute check until uh, you click on edit And we might change that in the future. It just it was just get us going with the edit, right? Okay, so Put that away and anyway, so now you've seen the menu. It just says edit It's not very interesting and we'll probably add more stuff to it later Okay, so that's that piece and if we scroll down here Oh, okay, so the rest of the stuff I think are just I'm just changing the labels To text box text boxes. Let me see is that is that truly? Oh, no, this is different down here and okay, so Let me come back up here. Yeah, so I went through here and changed all the labels that That use the name Let's see. Where is it? Well, anyway, so if you remember from Way back when The label gosh, I don't know what to call this um control Is label actually a control like I don't know Uh, let's see. What do they call it? Yeah, that's a control. Anyway, so label control will not display an underscore Go figure So all my uh, my router underscore zero was the underscore is being remote So I had to go in here and change all my labels out To text boxes and then I had to add is read only and then I set the background to transparent and then turned off the border thickness blah blah blah blah You know to basically make the text box look like a Uh label right so so this this name right here this this guy right here Uh used to be a label this router underscore zero, but it kept taking out the underscore So I had to uh change it to a text box Uh, that's just one of one of the weird little things I ran into with wpf And I kind of googled around and some people said I just used text boxes and And no one really said any kind of fix for the underscore if someone knows they feel free to let me know in the comments I'd be curious. I don't know if I'll go back and change them But uh, you know, I'd make it look a lot better than having to add all this junk up here the the different I guess attributes for the text box, right? Okay, so Let's see. What else did we change? Uh, we changed the Uh, let's see data grid auto generate columns Oh, I just made them read only equals true And that was for the Oh, yeah, that's that's to um There's a little simply so when you click in here, right? If you left click in here and if it's not set for read only It will let you Edit the this basically you can change this go to bob if you wanted to And uh, and we didn't want that.  I just showed you Uh, I don't know if it's a bug or or feature. Who knows So, uh, yeah, we turned on the read only there and what did we do here? Oh, this turned on read only on this on the cell template So you can't change any of the um I don't know do we need it on both probably not this one right here is probably not needed Uh, oh, oh, oh, I remember what this is Yeah, this one is this is This one was was irritating. This this took me a little while to figure out what was going on Yeah, let me show you that real quick.  We'll go to uh home And uh, oh That's home What are you? Oh, no, we want solutions explorer And node edit gun fig xaml let's scroll down here to Yeah, let's take this out for a sec and start this And here it comes Okay, so add router edit Get it to get fig. Okay, so so if you notice now it is added this Extra box down here and I went through my my loop and I'm like am I adding You know, what is this thing?  Well This is this is microsoft's Way of adding a new this is so you can edit this list the user can edit this list Basically they can come in here and go blah. Oh, well, it's something read only but the cell is But the list is editable and this is its new line Right. The problem with that is I was like, what is this thing? I so I click on it and I right click and I click on edit and crash And I'm I'm looking at this this crash and I'm going I'm going it's unable a cast object of ms internal name all that blah blah blah blah And I'm kind of googling around. I'm going what what what is this thing and and you can read this if you want to It's actually fairly meaningless. It has nothing to do with what the well I'm sure it has something that this is what the compiler is complaining about um, or not the compiler but the uh Debuggers come, you know saying yeah, this is this is this is bad You know, I it's basically trying to cast some some object, right? Into something that it doesn't like anyway. It's trying to class cast in this class kvp and it can't do it You know, I was like, you know, I googled around and a couple other people asked about it and And I didn't really see any decent answers and I'm going I'm going You know, why is it adding that so I finally I think did I leave it in here? Let's see where did I add it somewhere around here and we'll look at this here in a minute. Anyway, what I did is I added a A print statement to just print out What it was adding See where did it crash up? Yeah, right here. So I I guess I deleted it Anyway, somewhere around here. I guess right here. I just put a debug print statement and just printed Printed out what this is. I was trying to see what it was You know what it was and it said it was a A new line element and as soon as I saw new line I said, you know what? I bet you a dollar to a donut hole that if I turn on read only where it's not editable it will fix that and And sure enough it fixed it so so And that that kind of that was kind of lucky I I turned I printed out You know what that object was, you know, I was to do it. I I could show you but I don't want to waste the time Anyway, just do a debug print You know That object two string if you just put two string again After it it will dot two string It you can print out and kind of get an idea what the hell that thing is It's and why I can't cast it right? I couldn't get anything from the debug statement So that was a little rant on that little guy that that that sent me down a rabbit hole for about an hour. I bet Anyway, uh, let's see and then we had another read only down here and and this is for the cells This is just saying the name Is read only? I'm not sure Let's see.  I don't know why I split it up like that, but I could probably add it to both of them. I don't think it really matters But uh, I did maybe we'll come back and clean this up later All right, so let's go look at the code bind here And uh, yeah, as you can see there's quite a few changes in this one Okay, let's see What do we add? Uh, okay a couple comments Oh, here we go Sorry, my my brain isn't wasn't engaged here. Okay. Yeah, so um This is for our List box and when we're going and this is just a loop going through This is this is what builds that list, right? That's and this is where this For each i and pi which is each basically line and in our property info Yeah, so this is the the for loop that i'm that i'm looping through to build This list right here of the property info That we're getting from the no properties file, right? And I added this we had to add the attribute property If you will And that it also has it's just calling this new function get properties attribute, which we looked at in this the module mod io, right? And and it's just Returning the name and or it's it's using the the name and sending passing the node and Just pulling out the attribute value is nothing really exciting And that this is just a little check i'm doing so it's saying okay if it's if it's Microsoft and visual basic ease if not if not kbkvp.attribute like none Which is I don't know how many how many negatives is that like none? So not like none And uh, yeah, I'll let you work on that one And and what this does really right here this this if statement is Uh, let's see. What is our class node properties here? So like the index value is means nothing to the User it's only for our use You know in the in the code So as you can see it doesn't have a view or edit attribute So we don't show it at all. They don't they don't need to see that And they also don't need to see the left and top coordinates of it, right? So yeah, that's that's all that That thing is doing. Let's see. Where are we? I think we lost our oops Okay, so that's that's what that's doing right there It's saying if it's not if it's not like not It's not like none Then then go ahead and edit right and uh And then here's the here's our new edit value Subroutine that we added For the menu item edit Okay, that we looked at just a second ago And of course it's using routed events to call it and pass the information to and let's see here Okay. Oh, yeah, this is where it was crashing We just talked about that didn't we? Yeah, so this is where it was crashing There's a little debug statement. So and I tried actually using this. So I said if select tvp You know before this cast. I think I I did it off this I said if this selected item is nothing, right? This is nothing statement and it still wouldn't crash because it's not nothing It's something it's just an object that it can't cast Anyway, I digress. I don't want to hurt put that thing anymore Yeah, so we're just checking right here to make sure this thing's not empty If it does return and then we go check the the attribute If it's a view edit Then basically we just care about the edit portion of it Then we go ahead and call our new edit property page Okay, and that's that's these two pages down here that we'll look at here in just a second Sorry, it's a one page down here the xaml and the vb is two files All right, and the navigation servers is how we switch pages, right? And otherwise if it's just a view only then it just pops up this view only message box Okay All right, excellent Oh, okay. So next on the list is this node edit home xaml and yeah, I don't think there's much in this guy This is this is the screen before this one. This is where we we select configure, right for the node And I think all I did Yeah, see I just changed these labels to text boxes and I think And oh looks like I added a space a play client Yeah, I'm not sure what that that's just kind of weird right there. Why does it highlight that? Is there anything there? No anyway So that's it and that was to uh, I guess I'll go ahead and show you what that is That was for this Oops, that's for this right here Okay Before I would just say router zero and it would delete out the underscore And so I change it to a text box with all those other attributes I showed you earlier And now it's happy it shows the underscore. Okay, and let's see is there anything in the code behind? Oh Yes, there is Let's see. What is all this stuff Uh view button Oh, yeah, I remember what this is This is uh, oh shoot. I already closed it. Let's go ahead and look at this real quick This is something I added Um, this was just this just a little house cleaning stuff So before I used to be able to click on configuration or status or testing or reports I pretty much got the same thing you got this This node config, right? But now so now if you click on status you have view It just says Status selected right and what in let's go back or if you had testing view and reports So what I'm doing is I'm adding some logic to this thing. So when you hit configuration view You get the configuration and not and before any of these would do it And it's just going Let's just kill this guy and uh, you can see that in the code right here. I think oops We don't want to The break point do we? So before yeah, I just it just if you clicked on the view button It didn't matter what you selected. It just went straight to the node config and I added some Logic in there to just a bunch of fl statements And or else if statements sorry and um I said, okay, if it's click on configuration then go here And and this other stuff is is for later when we add In our reports or testing and It's some other stuff and and we will add this stuff later to status as good Testing will be probably huge In reports.  They got it. They got to have their pound of paper, right? so So anyway, we got we got to have some kind of reporting and then of course this is uh in ballot selection And uh, okay, so that's about it with that. Let's go look at our new properties files Okay, we'll look at the the node edit property xml xaml And um, just to show you where that is on the GUI that is edit Yeah, so that's when you when you click on something like the host name and edit That's this page right here. Okay And as you can see it just has edit property for The name router underscore zero property host name And this is where you actually edit the property.  Yeah, so let's go look at the What's going on there? Okay? Let's see Whoops, that's not it. Oh, that's right. It's a new file. There's no diff in a new file So, um, okay the xaml. Like I said, it's a page file Uh, class name is node edit property and basically To to make this so I don't bore you to tears with all this this is just a copying and paste of I think it was a config page Or or maybe the node editor page Yeah, no, I'm not the node editor of the page It was a copy and basically I just copy and pasted The pages and then I just came in here and And hacked it up and as you can see it's it's very similar to like the config page If we did a dip on the two I'm not going to do that and I'll let you do that if you want to But it's basically the exact same thing. We're just basically Building a column in row of one One text box Let's see. Yeah, so this is the label. We don't care about that text box is read only. Okay. Here's the the name Okay And let me let me get a screen cap of this so we can look at it while we're talking about it Yeah, so here's the name Right here. It's just a read only and this all this stuff is read only a name and the property that's That's uh, these two boxes right here and then We have a text box Right here that is this guy right here And it's actually a real text box that you can edit stuff That you just saw then we have a button And the button where's a button here? Oh, here's a button Okay Really the uh, it's the same as what we've just been looking at. We're still binding to the value I'm um and in the code behind We'll look at that here in a second. You can see I'm passing the data context so it can you know Use the value and uh, let's see Is there anything interesting here? No, really, this is all This is all Basically copy and paste I mean a little bit of a formatting change. I'm not gonna go through the formatting You guys can figure that out. It's it's confusing to say the least You know, you have to just kind of tinker with this a little bit to uh, you know to make it look like this but basically Uh, if if you don't know so this has got two columns and There's column one and column two and and then you got three rows. Here's Row one two and three And four. Well, how does that work? See, I don't even know how it works Let's see column row zero row one row two. Okay, there's three rows And uh, oh here we go row four. I didn't even add a row four on here. So Yeah That doesn't make a lot of sense does it and then the columns here's that column span two columns So everything's basically in the same column. I don't even know if I'm using oh here's column one For this for this guy. Where is he this edit property? So uh, Yeah, this is bizarre right here and and I could probably tinker with it Now I'll let you tinker with it. It's if you really want to get, you know, sexy with this thing you'd probably You know make it look a lot better This wizzy wig editor is is useless Uh If someone knows how to use this thing efficiently, I wish they They would comment and let me know because this this is useless I don't know that can anyone use this thing I mean even zoomed in I'm zoomed in name property here I here's a column one and column two that says column one.  I don't understand it. I I the way I do it I don't know if other how other people do it, but the way I do it is Is uh, I just tinker, you know, I take an example of something that works and I tinker with it until it I I make it look like it's going to work. Okay And if you look right here, you can see I've actually Chopped off part of this same button right here because I didn't do it right so so we'll have to clean that up later Yeah, a gooey layout Tutorial this is not I mean we're doing the wpf stuff because I wanted to keep this I'm sorry the xaml stuff because I want to keep this focused on wpf but This this gooey is uh, this this This editor is bizarre to say the least and and I should probably upgrade to 2019, but uh, yeah, we'll We'll make that another video. Okay Okay, so now I've completely Went off the tracks here and forgot where I'm at Uh, let's see. So, uh, anyway, that's the xaml. I think we kind of looked at this It's nothing real special. It's a copy and paste from I think note edit can figure something Or maybe note edit home Let's see what does note edit home look like. Oops. I didn't want to do a diff on it Yeah, so you know that home's got a say button or sorry view button and And I think it's a copy and paste of note edit home and then I just added a few few things to it Yeah, okay, so last but not least let's go look at the code behind for the note edit properties file Let's see and this is also kind of a cut copy and paste of note edit home We're seeing our data context to oh by the way, so yeah, so if you're I don't know if we showed this but Anyway from note edit config All right We're passing. Oh, we did look at this. That's right. We're passing the key value pair and I'm passing it by reference not not by object and we're passing the parent node So we're passing basically you're passing the key value pair Which is the you know key value pair Exactly and In the class node, okay, so And yes, the class node does have the class key value pair but It's this is this is built, right? This is using the class. This is a separate class. That's in mod io module And but this is so We know we know this is what we it's been selected This is the node that has all the information right and that's basically what we got going on here I went ahead and set the data context to the key value pair And I just said my node is the parent node print this stuff out and the debug and then in the text box name I uh I just I and I'm setting it to the nickname and yeah, and I did that earlier too I don't maybe I gloss glossed over that if I missed anything or you're confused on anything Let me know. I I know I've been kind of jumping around on this In a little bit. I I mean, there's a lot of files that were at I'm not doing a lot But you know, I touched, you know, geez how many files and see I created two new ones and one two three four five six seven files So, uh, that's a lot, you know And and so anyway if I if I glazed over something just let me know in the comments and I'll I'll clarify it Yeah, so if we look at the code behind I'm sorry. If we look at the xaml So we're binding the nickname property. Oh, where am I out here? I click on Sorry, I clicked on the wrong thing. I'm like, where am I? Uh At a property here we go. Okay. So, uh, Where are we here? It's um So we got the name and the property And of course, you know, I can't use these So here's the name the property and we want this guy and and yeah, so The name I think yeah the name right here is what we what we're doing so Yeah, here's the here's the text box. Here's the name of the text box. It's called text box name And and that's what this is doing is saying the text box names text Is this nickname? Okay So we want we want this property to be the Oh, sorry, this property right here name To be its nickname and in this case it just happens to be router zero And uh, you know, that's this default right? We just initialize everything with that And if you've been watching these videos, you probably know that already And I did this because I couldn't I didn't want to set the data context to the The class node and then try to mess with those key value pair So I I as a data context, I set the data context to the key value pair And we just dated the name out of this class node here and I think that's all we use the That four isn't it? It's the uh Let's see my node dot name Oh, yeah, so we get oh, no, we don't so the parent is so we do my node dot name That's in the debug statement. That doesn't mean anything and then nickname then um Oh Where is it? Let's look at this Okay, so name is oh, this is the nickname Yeah, this is the nickname. This is the property Yeah, so we're just using the once right And uh, yeah, that's why I didn't want to set the data context to it because we really needed the name out of it And I think I could have swore. I used it for something else. Let's see. Let's look at this real quick Okay, so we're getting the You know the class now we're getting the name out of it I'm sorry the nickname out of it My node that name I know data context Oh, yeah, I guess I you know for the debug And maybe We're using it. I don't think I'm using it my node dot prop key this is the Yeah, so this is using the they called by name, which is a reflect reflection object Or it's reflection, right? And uh, we we've used this call by name before if you remember when we're parsing through some Some data when we're saving off the config file and uh, yeah, so it's it's using the property file And uh, so we also needed here. I I just spaced out earlier We needed but we we definitely needed if we're going to save the value to the property file, right because property of files associated with the my node object and um, and then we got to send set the key and The value right for it. Yeah, I don't know. I was sitting there earlier. I I was just spacing out. I I couldn't remember what I was using it for but yeah, we have to save the value right And uh, I think that's it and we this can go look and see the way it works real quick That might be somewhat interesting. So, uh So we say edit config and uh, I tried this earlier Woops Now you got a right click. Yeah, see this is so this is we got a right click and edit and then we come in here and say um Bob's Your uncle All right, we save this. Okay We can go back and look at it And just close this Now if we edit it again, of course, it will it will show Bob's your uncle But and this is something I was thinking about we'll probably do this in another video but You have to make sure to save this right? Uh, otherwise it won't take and uh, oops, I didn't mean to do that So I I have a file of what this is our general config file we've been using And uh, you can see right here. I tested a couple we can go ahead and do this one if you want And uh, so the host name so this will be so this is the Cisco Dallas switch And this will be the Oh, yeah, let's go look at it real quick. So I think I kind of Yeah, so here's the Dallas Cisco gateway.muxl.com and then I just call them Cisco Dallas Probably shouldn't just say switch or Dallas switch or something like that Yeah, so here we can go config And then the host name. So this is a fqdn type host name Oh Oh, there it is. Oh, no, I didn't I could have swore. I see I did a control c earlier Let's see. What is this host name? I'm gonna come up something real quick.  So I'll just call it the the Dallas gateway Okay It's just going to be kind of nice too, I guess, but it's not that important. Oh that I not hit save And big I did it did not update this. I thought it did. Okay, so file save big view Okay, so well, we've got a bug. I you know what I I tested this and I guess I I did I could have swore See these anyway Uh, let's let's just reopen it and it this would probably be easy enough to fix So, uh, so I saved it. All right, and um And when I do a file save like this I should have in the background did another open, right? If I'd just done another open on this it would have just kind of flashed for the user But it would have updated all this But what's really strange about this is so with all this binding stuff going on as you can see it's not binding Very well, and and so we've got something that's not You know right in here. It's it's just a one way binding going one way. It's not going backwards And and maybe in the future we'll come back and see if we can clean this up a little bit But right now we've got our save going. So that's good thumbs up, right? So now we can start naming all this stuff. We can give it Host names for our, you know meaningful routable host names All right, so, uh, yeah, this is good. This is this is actually becoming meaningful. So now when we go to Uh, you know saying command On these guys, right? We can actually pop in the host name. So what's probably probably gonna need on this is, um No, those names should work. I was thinking maybe an ip address, but But yeah, that should be resolvable, right? So anyway, that's it So don't forget you can support the network engineering video blog By donation using a credit card and PayPal or by purchasing products at the muxall store Details and links are in the description under this video Well That's about it for this video If you like the video give it a big thumbs up That helps and hit the subscribe button. That really helps If you have any questions or comments post them in the comments under this video Thanks for watching and i'll see you next time


Physical is keeping time always, but there are dimensions within you which are not related to time. Only little initial guidance may take time. Namaskaram Sadhguruji, I'm Vrindavan. So my question is, how can one spend a balanced time in academics and spirituality or maybe career and spirituality? See, anything that you do with your body is connected to time, it takes time. You want to run, you want to walk, you want to do this or that, everything takes time. What you do with your mind also takes time but not to the same extent enslave to time. I mean our sense of time is only because of our body. You don't have to look at your watch to know what is the time.  I'm saying our sense of time is essentially because of body. We had sense of time even before the watch came, isn't it? Because physical is keeping time always. How long you can sit here, how long you can walk, how long you can do something, everything is decided by time. Time may be a relative experience at different times. Sometimes you have seen at a certain time when you're very joyful one day, twenty-four hours, poof, went like a minute, another day you're little depressed, I'm sorry, clinically depressed. Then that one day feels like a whole lifetime. So when somebody is very miserable, you will see time just won't roll. So time is a very relative experience, but still it's very directly connected to our body.  So when it comes to the mind, it is not as much enslave to time as your physical body, but mind also has time. But there are dimensions within you which are not related to time. So this thing about right path, wrong path, all these things largely relates itself to body because it takes time, it takes away life. If you just take a wrong turn, it'll take away life. Maybe you lost half an hour, but you lost not half an hour of time, you lost half an hour of life, isn't it? So when it comes to physical things, we must be little conscious of which turn to take because it takes away our time. Mentally, you can take any turn you want, whichever way you want because it doesn't take much time. So when you talk about spiritual process, it doesn't take time at all, it's an inner dimension which doesn't relate to time. So your education, you may be studying, you may be running, you may be working. To be spiritually doesn't take time, only little initial guidance may take time. Afterwards, it doesn't consume time because it's not physical in nature.


When planting a food plot, there are several considerations to be made. The results from your soil test will help determine what crop species will do best on your property. The composition in regards to clay, sand and loam will have an effect on crop selection. Certain crops may do well in poorly drained sites, while others can handle dry sites prone to drought. Regardless of soil type and location, you should always amend the pH and nutrients as recommended by the soil test to increase your chance of success. You should also familiarize yourself with pre- and post-emergent herbicides. If you plan on buying a blended seed mix or creating one yourself, be sure that the species being mixed have similar planting depths and can be treated with the same herbicides. To understand more on food plots, consult with your local extension agent or state wildlife biologist.


Welcome back to the lectures on Quantum Chemistry or Quantum Mechanics. The series of lectures is being given to you through the support and the help of the National Program on Technology Enhanced Learning NPTEL and I am Mangala Sundar. I am from the Department of Chemistry IIT Madras. I am a professor of Chemistry and I teach subjects in physical chemistry, particularly Quantum Mechanics, Spectroscopy, Group Theory and so on. This is a continuation from the lectures that we have so far had. With a slight change, we will study today the transformation and the change of coordinates from Cartesian to polar spherical polar systems. We shall follow that for the purpose of solving the hydrogen atom later on, but an appreciation of the chain rule in differentiation and its application in arriving at the suitable forms for the Hamiltonian operator, particularly the kinetic energy operator. That is important and some clarity is needed. So, let me start with the coordinate transformation on two dimensional systems. Cartesian to polar, we can do other systems in a similar way, but let me limit my attention to that. In a Cartesian system, of course, when you write x and y axis and a point as x, y, then the polar representation of that point is given by its radial distance from the origin which is r and r is given by the vector sum that you are familiar with from the unit vectors multiplied by the magnitude of the projection added to the unit vector multiplied by the magnitude of the projection on this y axis. So, r is given by square root of x square plus y square where x and y are the magnitudes in the respective directions. And then there is a theta which is the angle from the chosen x axis, then you have x is given by r cos theta and y is given by r sin theta and therefore, theta is tan inverse y by x or tan y by x ok. So, these are the simple transformations and the corresponding if this is the transformation, then this is the inverse or in theta in terms of x and y. If any function is expressed in terms of x and y and we want to change that to x is equal to r cos theta, y is equal to r sin theta, the functional form will be slightly different and we will write that as g r theta. An example of that is say x square y, if you do that then x square is r square cos square theta r sin theta which is r cube cos square theta sin theta. If we want to do the derivative dou f by dou x or dou f by dou y or dou squared second then further derivatives dou squared f by dou y square dou squared f by dou x dou y etcetera if we want to do that. Then we want to convert those things into r and theta, the corresponding expression you should be familiar with is dou by dou x is given by the chain rule dou r by dou x dou by dou r, x is a function of r, x is a function of theta. So, dou theta by dou x dou y theta and likewise for the partial derivative operator dou by dou y it is dou r by dou y dou by dou r plus dou theta and likewise for the second and third derivatives. Now, we can calculate these because these are keeping the other variables constant and dou r by dou x you can calculate using the relation r is equal to square root of x square plus y square. So, if you do that r is equal to that x square plus y square therefore, dou r by dou x is going to be x by square root of x square plus y square which is r cos theta by r and therefore, that is cos theta yeah likewise we can derive the derivative dou theta by dou x, we know theta is tan in this y by x therefore, dou theta by dou x will give you 1 by 1 plus y square by x square times minus y by x square which simplifies to minus y by x square plus y square r when you put that in terms of r and theta it is r sin theta divided by r square gives you minus sin theta by r. Therefore, the derivative equivalent of dou by dou x which is in Cartesian coordinates in terms of the polar coordinates is now given by the cos theta times dou by dou r minus sin theta by r dou by dou theta ok. Now, exactly what is meant by this you can very easily verify that a given function for example, x squared y which in the polar form is this whereas, which in the Cartesian form is this in the polar form it is r cube cos theta sin theta. If you take the derivative of this function with respect to x dou by dou x you will get to x y which if you substitute in terms of x and y you will get the polar form. To get that same form from here you must use this derivative expression and therefore, the the equivalence is that x squared y and dou by dou x or equivalent respectively to r cube cos square theta sin theta and cos theta dou by dou r minus sin theta by r dou by dou theta that is what it is you have to transform everything carefully. Now, this is only with respect to the derivatives when we do integration if we write an integral d x d y and suppose we do the full integration minus infinity to plus infinity minus infinity to plus infinity some function x and y. If you want to replace that using the polar coordinates then it is important for this area element d x d y to be x plus in terms of d r and d theta and that is also given by the standard Jacobian determinant ok which tells you that the quantity d x d y is the determinant without the sign of dou x by dou r dou x by dou theta dou y by dou r dou y by dou theta d r d theta ok x y x y r theta r theta in the denominator easy ways to remember those things ok. Now, that is easy to calculate again using the transformation rule since x is equal to r cos theta dou x by dou r is cos theta ok dou x by dou theta is minus r sin theta and y is equal to r sin theta therefore, dou y by dou r is sin theta and dou y by dou theta is r cos theta. So, if you put that substitute that here in the determinant form what you get is dou x by dou r which is cos theta then dou x by dou theta which is minus r sin theta then you have dou y by dou r which is sin theta and you have dou y by dou theta which is r cos theta d r d theta and that when you do this is r d r d theta ok. The last thing is the transformation of the limits with that our idea of doing this for the two dimensions is taken is taken care of. So, the limit x tending to x from minus infinity to plus infinity and y from minus infinity to plus infinity essentially means integration over the entire plane of x and y and you can using the r and theta if you choose any value of r ok and if you do the theta integration from 0 to 2 pi then you integrate over the line and as you vary r you will and for each value when you integrate this over theta and phi you reproduce this entire area of integration through circles of different radii r and the theta being from 0 to 2 pi. So, that the limit becomes r goes from 0 to infinity theta is from 0 to 2 pi this with d x d y is equal to r d r d theta and therefore any function f of x comma y if you have to do that from x is equal to minus infinity to plus infinity y is equal to minus infinity to plus infinity when you express f of x in terms of g of r and theta by substituting x and y the integral is r is 0 to infinity and the integral theta is from 0 to 2 pi g r theta r d r d theta this is the equivalence with respect to integration. The derivative is dou by dou x I have written you can write a similar derivative for dou by dou y the moment you know dou by dou x and dou by dou y you can construct dou square by dou x square by having those two operators next to each other and being careful enough to recognize that the derivative will not only the dou by dou r will not only act on the dou by dou r and dou by dou theta but also on any function of r that appears in the derivative. So, if I have to write dou square by dou x square this whole thing acting on itself will have to be done carefully because when dou by dou r acts on this part in its following form it will have not only a second derivative of dou square dou r dou theta but also dou by dou r acting on minus sin theta by r because it is an r here. Making sure that those things are taken care of algebraically this is essentially all that we need to do in transforming the coordinate system from one representation the Cartesian coordinate representation to another coordinate representation the polar coordinate representation. Just to complete to this let us carry this exercise out for x square y and just to do the differentiation is trivial but still let us do that dou by dou x or x squared y is 2 x y which is 2 r square sin theta cos theta dou by dou x on x squared y is cos theta dou by dou r minus sin theta by r dou by dou theta acting on the polar form of x squared y which is r cube cos square theta theta.  So, you have r square cos cube theta ok which is 1 minus what do we want to do we want to show that it is sin theta cos theta. So, let us represent this by this is 3 r square cos cube theta sin theta and you have the derivative oh there are two things dou by dou theta on this. So, there is one more term which is stop you have to go back in that in the Armikinon sorry dou by dou x on x squared y is on x squared y is cos theta x on x squared y minus sin theta by r dou by dou theta acting on the polar form of this which is r cube cos square theta and sin theta ok.   So, you have two terms namely 2 cos theta minus sin theta.  So, you have cos cube theta cos cube theta sin theta 3 r square 2.  So, this is the form therefore, you see the equivalence the derivative acting on the function is equivalent to the derivative in the coordinate changed coordinate representation acting on the function changed representation. These are things that you have to remember for 3 dimensions and also in general for anycoordinate transformation process. Now,when non orthogonal systems are involved the second derivative expressions for the kinetic energy from Cartesian to the polar form gets very messy, but that is a process that one has to follow by carefully following the derivative formula. These are all done for second 2 coordinates 2 dimension systems. Now, what about the 3 dimensional spherical polar coordinates to write. So, I will leave you with an exercise namely before we move on to the 3 dimensional coordinate system. So, I will write dou square by dou x square plus dou square by dou y square which is a Laplacian into dimensions usually it is written as del squared write this using r and theta dou by dou r dou by dou theta dou square by dou r square dou square by dou theta square and dou square by dou r dou theta if any of them are involved ok using that do the transformation it is standard I will not do that here, but it is very easy to follow if you have followed the algebraic details namely dou square by dou x square is this acting on itself dou square by dou y square is a corresponding expression for dou by dou y maybe let me just write down dou by dou y alone as a help. So, it is dou r by dou y dou by dou r plus dou theta by dou by dou theta and you can calculate this since r is square root of x square plus y square you can easily say that dou r by dou y is y by square root of x square plus y square and that is sin theta and the expression theta is tan inverse y by x therefore, dou theta by dou y would be 1 by 1 plus y square by x square times 1 by x which will give you x square in the denominator.  So, the expression for dou by dou y should be sin theta dou by dou r plus cos theta by r dou by dou theta ok cos theta by r dou by dou theta phi. So, with that you can calculate dou square by dou x square dou square by dou y square and then dou the sum ok. So, that is a two dimensional transformation. Now, let us do the three dimensional transformation, but before we do that we will see this one animation which is an illustration of the three dimensional coordinate system. Now, what you have here is the spherical polar coordinate system well it looks like a sphere, but you can see the axis system right handed coordinates and any point or any point which is now represented by the sphere of that radius x, y, z just do that. So, any arbitrary point with the coordinate x, y, z has in the polar form you see theta is the polar coordinate with reference to the z axis and the projection of the vector r on theta gives you r cos theta. The projection of the vector r on the x, y plane gives you r sin theta, but it may not be in any alignment with the x axis or the y axis. So, if the arbitrary angle if the angle of this projection with the x axis is given as phi then you can see that it is r sin theta cos phi and the other is r sin theta sin phi. So, this is the transformation that one has to be familiar with namely x is equal to r sin theta cos phi, y is equal to r sin theta sin phi and z is equal to r cos theta. Now, the two dimensional representation that you had was assuming theta to be 90 degrees because it was only on the x y plane. So, if you were to look at that then it is easy the same thing you can see it here. So, when this whole thing is reduced to theta is equal to 90 degrees you see that it is on the x y plane and since it is sin theta r cos theta is 0, since it is sin theta you have r cos phi and r sin phi which is what you had used for the two dimensional representation ok. So, let us now get back to the algebraic details ok about how we do this and this transformation is important for the study of hydrogen atom by standard methods and for understanding the mathematical basis for the orbitals that we have used earlier in the elementary chemistry courses and so on ok. So, one has to write this as r sin theta cos phi, y as r sin theta sin phi, z as r cos theta ok. Now, the rest of the lecture I do not want to derive the relations it is not possible for us to do that, but I shall indicate how to do it and there is a handout which is there in the NPTEL website associated with my course where these things have been written out fairly carefully. If you find mistakes please do let me know and the colors have been given. So, that the three coordinates r theta phi are given three different colors to see how the transformation is done it is just to help those of you who are not certain of the algebra to hand hold you through that part, but I am only going to summarize the results here ok.  These are the inverse transformations and for getting theta if you take the squares of these two add them up you get r square sin square theta. So, the square root of this sum gives you r sin theta therefore, theta is tan inverse square root of x square plus y square by z ok and phi is of course, the tan y by x gives you I mean y by x gives you tan phi therefore, phi is tan inverse y by x. So, these are the three inverse relations if you start from x y z therefore, the corresponding derivatives expression which we will need for the hydrogen atom and any function of x y z then you substitute x in terms of r cos theta r sin theta cos phi y is equal to r sin theta sin phi and z is equal to r cos theta if you do the substitution this will give you a functional form g r theta phi ok and the differentials if you have to write dou by dou x dou by dou y and dou by dou z have to be also written in terms of dou by dou r dou by dou theta dou by dou phi and that is just an extension of one more coordinate from what we did earlier we had r in terms of theta sorry we had x in terms of r and theta, but now we have in terms of r theta phi.  So, I shall give you just the resultsand these need to be substituted in order to get the hydrogen atomthe kinetic energy operator which is in terms of the minus h bar square by 2 m that p square p square is thesquare of the this is a second derivative dou square by dou x square dou square by dou y square dou square by dou z square. If you add all those three things you will get the the kinetic energy operator. And therefore, you need these three quantities it is just a long algebraic exercise and I usually tell my students who are doing it for the first time to allocate roughly between 2 and 3 hours to sit down and do thisin calm and very careful manner and not to make an algebraic mistake because tracing the algebraic mistake probably will take more time than re-deriving the whole thing. So, I usually give this as an exercise to the students in the class and at least about 5 to 10 students come back later saying that they have done it. It is a it is a worthwhile exercise for those of you who have not doneany serious mathematics, but who are also interested in understandingin following the algebraic details one should do that ok. So, let me just write down the expression for the derivatives I shall not do anything more than that here yeah. I do not remember these expressions. So, let me just copy them down dou by dou x is sin theta cos phi dou by dou r plus cos theta cos phi by r dou by dou theta minus sin phi by r sin theta dou by ok. Whenever you have an inverse with r make sure that every term has that because r usually represents length theta and phi r dimensionless. So, you have dou by dou r is important to have a 1 by r 1 by r things to remember ok dou by dou y if you do that it is sin theta sin phi dou by dou r r is already there in the denominator and therefore, when you have the next derivative cos theta sin phi by r dou by dou theta plus cos phi by r sin theta dou by dou theta ok. And the last expression that you need is dou by dou z which is cos theta dou by dou r minus sin theta by r dou by dou theta right. One can go through the algebra, but at the end of the day if you are going to write the derivative dou square by dou x square plus dou square by dou y square plus dou square by dou z square which is the Laplacian in three dimension in Cartesian coordinates. If you were to write that using the r and theta phi coordinates the some final expression is written in a compact form it is 1 by r square dou by dou r r square dou by dou r plus 1 by r square sin theta dou by dou theta sin theta dou by dou theta plus 1 by r square sin square theta dou square by dou phi square ok or phi square I use phi and phi as interchangeably. So, do not get confused if you here phi or if you here phi they are depending on where I am and what I am saying you know that they are the same in this particular case. Now all this means is that this is a compact way of writing the derivative the derivative is essentially this is equivalent to if you put the derivative dou by dou r on r square you will get 2 r therefore, 2 by r dou by dou r that is one term and the other derivative will be and the r square is here it is dou square by dou r square ok. This is written in that form and likewise here if you are looking at this term the analogy is 1 by r square dou square by dou theta square sin theta will cancel or when the sin theta is acted upon by the derivative you get cos theta by r square sin theta dou by dou theta ok that is the analogy that is that is that is the exact form which is written in a compact notation by mathematicians or I mean for years many many years ago and it is used in quantum mechanics ok. So, these are the derivative forms for the polar coordinates when you convert them from the Cartesian form and one of the reasons for the hydrogen atom being studied in the polar coordinates is that in a field free case the potential energy is centrally symmetric that is it is only a function of r it is not it is independent of theta and phi and therefore, the potential energy and for the part of kinetic energy that can be solved together for the total energy can be done much more quickly in the radial coordinate system and therefore, you have the radial functions that contain the total energy. The angular functions do not contain the total energy, but they contain the distribution of the function or the spread of the wave function on a sphere how it is done and for any arbitrary function on a sphere one would find out that the basis functions which are most suitable or the functions known as spherical harmonics and the solution of the Legendre the associated Legendre equation along with the differential equation for the hydrogen atom in the phi coordinates will give us the spherical harmonics as the natural solutions and therefore, the mathematics is in the case of hydrogen atom in terms of polar coordinates very nicely splits into a radial part and an angular part and the angular part is what you usually have seen in the form of the orbital structure the P orbitals the D orbitals and the F orbitals and so on. The radial parts tell you where how far away from the hydrogen atom the nucleus that the electron density is maximized and that depends on the quantum numbers associated with the radial coordinates and the energy is also a function of the radial coordinates. So, all these things come out when we use this particular form of the representation for the hydrogen atom. The last thing before we leave is to look at the integrals particularly when we do the integration of these functions in polar coordinates the equivalence between this minus infinity to infinity minus infinity to infinity that is over the entire 3 dimensional world d x d y d z of a function of x y and z its correspondence in the polar form when the function is replaced by the corresponding polar quantities and gives us a function of G in terms of r theta and phi what are these represented as same as what I had done in the 2 dimensional case the mathematics the simple partial differential calculus gives us the result that the volume element d x d y d z is related to the volume element of the r d theta and d phi in terms of the Jacobian which is the sinless determinant without the minus sign here it is dou x by dou r dou x by dou theta dou x by dou phi we had only 2 for the polar coordinates in 2 dimensions now we have all of them and likewise it is dou y by dou r dou y by dou theta and dou y by dou phi dou z by dou r dou z by dou theta and dou z by dou phi determinant 3 by 3 d r and it is easy these are all easily calculated because you know x is equal to r sin theta cos phi therefore it is easy to write down dou x by dou r is sin theta cos phi dou x by dou theta is cos theta r sin phi and dou x by dou phi is minus r sin theta sin phi so likewise you can get the other 3 derivatives in terms of y using y and using z when you do that substitution finally what you get out is that you get r square sin theta as the value of the determinant multiplied by d r d theta and d phi ok. So, this is the volume element transformation from the Cartesian to the spherical polar coordinate system. So, the last thing that remains is now the limits how do we transform this limits minus infinity to plus infinity minus infinity to plus infinity and so on again if you see the animation you will see immediately why the limits are what they are ok. So, let us look at the animation here which is to tell you the extension of the coordinates or the limits of the coordinates we start with the phi which is the coordinate the angle or it is called the azimuthal angle perpendicular to thez axis the polar axis phi is a full 360 degree extension from 0 to 360 degrees. So, it is a circular complete that. So, that is the phi now this is one value of theta theta is equal to 90 degrees and therefore, thechange of theta from 0 to 90 0 to 180 will give us the corresponding circular sections. So, if we take that arc theta is equal to 0 to 180 that is a semi circle and with the phi going from 0 to 360 it produces the surface area of the sphere ok. It is not necessary that you should do theta is equal to 0 to 2 phi it is only necessary that you do theta is equal to phi ok. So, you have the angle coordinates theta is equal to 0 to phi and phi is equal to 0 to 2 phi generate the surface area of the sphere this is the full surface section of the sphere and therefore, all that you need to do is to reduce the sphere from r is equal to 0 to r is equal to infinity. So, that you generate the entire three dimensional volume for each value of r and for every theta 0 to 2 0 to phi and phi is equal to 0 to 2 phi you are integrating over the volume of the sphere and as you vary the radius from 0 to infinity you are integrating over the entire universal three dimensional space. Therefore, r is equal to 0 to infinity theta is equal to 0 to phi and phi is equal to 0 to 2 phi is equivalent in the spherical polar coordinate system is the corresponding equivalent to the integration using the Cartesian coordinate system x y z d x d y z over all the three dimensional space ok. So, these analogies I mean these transformations are important. However, elementary or preliminary they may be one should not have any doubts on this one should not leave I mean there should not be any lack of clarity in these kinds of things. We will look at the hydrogen atom later and we shall also continue with the mathematics of solving the Schrodinger equation for specific cases later, but with this we can now go on and study the hydrogen atom split the hydrogen atom equations into the radial part and the angular part which I shall do in the next lecture and then tell you how the radial equation is associated with the Laguerre equation and the angular part gives rise to solutions known as the spherical harmonics. So, we will have one or two more lectures to dwell in the mathematics of the hydrogen atom with this as the preliminary and with the power series method you are only done with the Hermite polynomials and also for the second order differential equations as tools. Therefore, you see that these things keep on building from one to the next step and so on and the unfortunate thing is beyond hydrogen atom this kind of the so called mathematics cannot be carried analytically, but we will have approximation methods, but that is shooting too far away from now and let me conclude this lecture with the note that in the next lecture we shall start separating the hydrogen atom Schrodinger equation into radial and angular part. Until then thank you very much.


Sometimes it's not possible to evaluate the integral. However, because the integral is a sum, we might be able to determine convergence or divergence without computing the actual value. And we might be able to proceed this way. Suppose 0 is less than or equal to f of x, is less than or equal to g of x, for x greater than or equal to sum value k. Then the integral from k to infinity of f of x should be less than or equal to the integral from k to infinity of g of x. Since the integral from a to infinity of f of x is the integral from a to k of f of x, plus the integral from k to infinity of f of x dx, and the integral from a to k is finite, Then the convergence or divergence of the integral from a to infinity depends only on the convergence or divergence of the integral from k to infinity. And a similar result holds for the integral from a to infinity of g of x. What this suggests is the following theorem. Suppose zero is less than or equal to g of x, for x greater than or equal to some value k. Then if the integral from a to infinity of f of x diverges, so does the integral from a to infinity of g of x. Likewise, if the integral from a to infinity of g of x converges, so does the integral from a to infinity of f of x. We could look at it in another way. If you're larger than a divergent function, then the integral diverges. If you're smaller than a convergent function, the integral converges. For example, suppose we want to determine if the integral from zero to infinity of e to power minus x squared dx diverges or converges. Now there is no antiderivative of e to the minus x squared among these simple functions, so we can't evaluate this integral directly. Instead, we need to be able to compare it to some function whose convergence or divergence over the same interval is known. This is unfortunately the hardest part of the problem, and there is no algorithm, no formula, no process that will allow you to find what that function is. However, in order to gain some insight, we might proceed as follows. e to minus x squared is really 1 over e to the x squared. So one possible comparison function is 1 over something. Now we've determined the integral from 1 to infinity of 1 over x squared converges, so maybe we'll try and compare this to 1 over x squared. Since we don't know whether this is less than or greater than, we'll leave that empty until the end of our analysis. Since both e to the power x squared and x squared are positive numbers, if I cross multiply, I won't change the direction of the inequality. So now the problem is comparing x squared to e to the x squared. One way to do this is to look at the ratio between the two expressions. Since we really hope that x squared is the smaller expression, let's look at the ratio of x squared over e to the power x squared. So we'll take the limit as x goes to infinity of this ratio, and this is good for a L'Hopital's visit. We find that the limit as x goes to infinity is zero. Consequently, x squared less than e to the power x squared is eventually true, and so their reciprocals will have the same inequality, and that gives us e to minus x squared must be eventually less than 1 over x squared. So we know that the integral from k to infinity of e to minus x squared dx is less than or equal to the integral from k to infinity of 1 over x squared for some value k. This work is only useful if this larger integral converges. So let's check. The integral from k to infinity of 1 over x squared is an improper integral, so it's going to be the limit as b goes to infinity of k to b of 1 over x squared. We'll find the integral and take the limit, which is finite, so our integral converges. So our smaller integral converges, as another example, let's consider the integral from 1 to infinity of c squared of x over x. So again we need a suitable comparison function, and here the problem is the secant function. Since secant is 1 over cosine, we know that secant squared is 1 over cosine squared, and so secant squared is always going to be greater than or equal to 1. So secant squared over x is always going to be greater than or equal to 1 over x. So the integral from k to infinity of secant squared over x is going to be greater than or equal to the integral from k to infinity of 1 over x. But the integral from k to infinity of 1 over x diverges, and so does our integral.