So I was asked to simplify the expression  $$\frac{\sin(1) + \sin(2) + \cdots + \sin(100)}{\cos(1) + \cos(2) + \cdots + \cos(100)}.$$ I'm struggling to find a way of doing it.  I'd like just hints rather than a whole solution if possible.  Thanks in advance
How can we sum up $\sin$ and $\cos$ series when the angles are in arithmetic progression? For example here is the sum of $\cos$ series:  $$\sum_{k=0}^{n-1}\cos (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \cos \biggl( \frac{ 2 a + (n-1)\cdot d}{2}\biggr)$$  There is a slight difference in case of $\sin$, which is: $$\sum_{k=0}^{n-1}\sin (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \sin\biggl( \frac{2  a + (n-1)\cdot d}{2}\biggr)$$   How do we prove the above two identities?
Luggage transfer in Dubai between flights, without a visa I am traveling from Stockholm to Dubai and Dubai to Nairobi using two different airlines. I have Kenyan nationality and can't go through Immigration because I don't have a Dubai visa.    How I will get my luggage? I have tried a little bit which as follows- Since $f(x_n)\in[0,1]$, $\{f(x_n)\}$ has a convergent subsequence say $y_n=f(x_{r_n})\ \forall n\in\Bbb{N}$ Let, $\lim y_n=l\implies \lim \frac{y_1+y_2+\cdots+y_n}{n}=l\implies \lim \frac{f(x_{r_1})+f(x_{r_2})+\cdots+f(x_{r_n})}{n}=l$ But I am getting no idea to proceed and prove the convergence of $\{x_n\}$. I have also tried to prove the sequence to be cauchy which goes- $x_{m+1}-x_{n+1}={\sum_{i=1}^m f(x_i)\over m}-{\sum_{i=1}^n f(x_i)\over n}\le {\sum_{i=1}^m f(x_i)\over n}-{\sum_{i=1}^n f(x_i)\over n}$ (since $m\ge n)$ $\implies |x_{m+1}-x_{n+1}|\le \frac{|f(x_m)|+|f(x_{m-1})+\cdots+|f(x_{n+1})|}{n}\le\frac{m-n}{n}$ (since $f([0,1])\subseteq [0,1])$ Now, what will I get if I tend $m,n\to\infty$? But I need to do something more in the 2nd case since I have nowhere used the continuity of $f$.  Can anybody give an idea to prove it? Thanks for assistance in advance. In MySql's interpreter, it's very easy to dump a table to the screen along with its field names.   There seems to be no simple way to export a table to a tab-delimted or CSV outfile including its column headers.  I'm trying to do this using only SQL or the Linux command line, without writing a program in another language.  Thank you Are vacuum fluctuations really happening all the time? Jquery change image on rollover with fade Problem installing .deb in Software Install Ubuntu 20.04 Galois group of irreducible cubic equation Java Command line arguments I am trying to detect whether the 'a' was entered as the first string argument. I am creating an ZIP file with ZipFile in Python 2.5, it works ok so far:  import zipfile, os  locfile = "test.txt" loczip = os.path.splitext (locfile)[0] + ".zip" zip = zipfile.ZipFile (loczip, "w") zip.write (locfile) zip.close()   but I couldn't find how to encrypt the files in the ZIP file. I could use system and call PKZIP -s, but I suppose there must be a more "Pythonic" way.  I'm looking for an open source solution. Is it possible to know from apt if the package was installed explicitly or as a dependency of another package? No more disk space: How can I find what is taking up the space? I've run into a problem on one of my servers running 16.04: there is no disk space left.  I have no idea what is taking up the space. Is there a command to list the current directory sizes, so I can traverse and end up in the directory taking up all the space? Why are processes in Windows 8 32 bit? What's an intuitive way to think about the determinant? In my linear algebra class, we just talked about determinants. So far I’ve been understanding the material okay, but now I’m very confused. I get that when the determinant is zero, the matrix doesn’t have an inverse. I can find the determinant of a $2\times 2$ matrix by the formula. Our teacher showed us how to compute the determinant of an $n \times n$ matrix by breaking it up into the determinants of smaller matrices. Apparently there is a way by summing over a bunch of permutations. But the notation is really hard for me and I don’t really know what’s going on with them anymore. Can someone help me figure out what a determinant is, intuitively, and how all those definitions of it are related? IS or ARE? "The only thing that I want you to hit right now IS/ARE the books" This is the PATH variable without sudo:  $ echo 'echo $PATH' | sh  /opt/local/ruby/bin:/usr/bin:/bin   This is the PATH variable with sudo:  $ echo 'echo $PATH' | sudo sh /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin   As far as I can tell, sudo is supposed to leave PATH untouched. What's going on? How do I change this? (This is on Ubuntu 8.04).  UPDATE: as far as I can see, none of the scripts started as root change PATH in any way.  From man sudo:      To prevent command spoofing, sudo   checks ``.'' and ``'' (both denoting   current directory) last when searching   for a command in the user's PATH (if   one or both are in the PATH). Note,   however, that the actual PATH   environment variable is not modified   and is passed unchanged to the program   that sudo executes. How to compile bibtex with TeXstudio? I am trying to use bibtex for the first time. I am on windows 7, using TeXstudio. I am trying to follow the steps of .  I have created a .bib file, put it in the right directory and written the code in my .tex file. However, I do not know how to compile bibtex with TeXstudio (I looked around in the menus but didn't find it).   Most tutorials I found don't explain how to do it, or say to run a command, which I'm not sure how to do.  Any help much appreciated! Duplicate notifications I receive every push notification from the iOS app twice on iPhone. The second comes immediately after the first. This happens every single time.   I also have the app installed on an iPad and signed in to the same account - could this be a possible cause?   App Version: 1.4.0 Device: iPhone7,2 OS Version: Version 9.1 (Build 13B143) How will multiple GPUs improve Cycles' rendering performance? I have an NVIDIA Titan GPU and I'm able to add another card, but I wonder whether  Blender will benefit from more than one GPUs?  Should I do it as SLI or should I just do it as an added card? I just need some help in understanding how Blender will use either SLI or a second GPU.  Note that I only use Cycles. I have Google Chrome Version 70.0.3538.77 (Official Build) (64-bit).  Today, after running sudo apt update and sudo apt full-upgrade, I saw:  E: Repository 'http://dl.google.com/linux/chrome/deb stable Release' changed its 'Origin' value from 'Google, Inc.' to 'Google LLC' N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.   I looked at the man page for apt-secure but it's pretty technical and difficult, at least for me, to follow.  So how do I fix this issue?    Edit: for now, I've removed the existing Google Chrome ppa from Software Sources and then ran sudo apt update and sudo apt full-upgrade successfully with the following being installed/upgraded successfully:  The following NEW packages will be installed:   python3-netifaces The following packages will be upgraded:   netplan.io nplan ppp 3 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. What is a deterministic method for evaluating a sensible buffer pool size? I'm trying to come up with a sane way to understand if the max server memory (mb) setting is appropriate (either should be lower, or higher, or stay the way it is).  I am aware that max server memory (mb) should always be low enough to leave room for the operating system itself, etc.    The environment I'm looking at has several hundred servers; I need a reliable formula I can use to determine if the present size of the buffer pool is appropriate since RAM is costed per GB allocated to each server.  The entire environment is virtualized, and "physical" RAM allocated to a VM can easily be changed up or down.  I have a particular SQL Server Instance I'm looking at now with a PLE of 1,100,052 seconds, which equates to 12.7 days (the amount of time the server has been up).  The server has a max server memory setting of 2560MB (2.5GB), of which only 1380MB (1.3GB) is actually committed.    I've read several items including one by Jonathan Keheyias () and another by Paul Randal (), and several others.  Jonathan advocates monitoring for a PLE below 300 per 4GB of buffer pool as being too low.  For the SQL Server Instance above, 300 * (2.5 / 4) = 187 results in a really really low target PLE below 300.  This instance has 290GB of SQL Server data (not including log files), and is only used for integration testing.  Assuming the last 12 days is representative of typical usage for this server, I'd say the max server memory (mb) setting could be lowered.  At the other end of the scale, I have another integration-test server with a PLE of 294, that has a max server memory (mb) setting of only 1GB.  This server has only 224MB of SQL Server data not including logs, and is running some BizFlow databases.  This server might benefit from a higher max server memory (mb) setting.  I'm thinking a good starting place for targets that might be assigned too much memory could include looking at:  SELECT      RamMB = physical_memory_in_bytes / 1048576     , BufferPoolCommittedMB = bpool_committed * 8192E0 / 1048576     , BufferPoolCommitTargetMB = bpool_commit_target * 8192E0 / 1048576     , PercentOfDesiredSizeMB = CONVERT(INT,(CONVERT(DECIMAL(18,2),bpool_committed)                              / bpool_commit_target) * 100) FROM sys.dm_os_sys_info;   If BufferPoolCommitTargetMB / BufferPoolCommittedMB is greater than 1, the server is not using the entire buffer pool.  If the machine in question also has a PLE of greater than "x" then it might be a good candidate for a decrease in max server memory (mb).  Since the Buffer Manager:Lazy writes/sec performance counter tracks the number of times SQLOS has written pages out to disk between checkpoints due to memory pressure, this might be another good thing to look at.  DECLARE @WaitTime DATETIME; SET @WaitTime = '00:00:15'; DECLARE @NumSeconds INT; SET @NumSeconds = DATEDIFF(SECOND, 0, @WaitTime); DECLARE @LazyWrites1 BIGINT; DECLARE @LazyWrites2 BIGINT;  SELECT @LazyWrites1 = cntr_value  FROM sys.dm_os_performance_counters dopc WHERE (         dopc.counter_name LIKE 'Lazy writes/sec%' COLLATE SQL_Latin1_General_CP1_CI_AS     )     AND dopc.object_name = 'MSSQL$' + CONVERT(VARCHAR(255),                SERVERPROPERTY('InstanceName')) + ':Buffer Manager';  WAITFOR DELAY @WaitTime;  SELECT @LazyWrites2 = cntr_value  FROM sys.dm_os_performance_counters dopc WHERE (         dopc.counter_name LIKE 'Lazy writes/sec%' COLLATE SQL_Latin1_General_CP1_CI_AS     )     AND dopc.object_name = 'MSSQL$' + CONVERT(VARCHAR(255),                SERVERPROPERTY('InstanceName')) + ':Buffer Manager';  SELECT LazyWritesPerSecond = (@LazyWrites2 - @LazyWrites1) / @NumSeconds;   The above code assumes the server is under load during the 15 seconds it takes to run, otherwise it will report 0; which might be a misleading false-negative.  Should I also look at PAGELATCHIO_* wait stats or some other wait type as an indicator of memory pressure, or lack thereof?   My question is, how can I reliably determine a "good" target value for PLE and max server memory (mb)?