{"action":"created","issue":{"url":"https://api.github.com/repos/chebfun/chebfun/issues/1560","labels_url":"https://api.github.com/repos/chebfun/chebfun/issues/1560/labels{/name}","comments_url":"https://api.github.com/repos/chebfun/chebfun/issues/1560/comments","events_url":"https://api.github.com/repos/chebfun/chebfun/issues/1560/events","html_url":"https://github.com/chebfun/chebfun/issues/1560","id":95010770,"number":1560,"title":"Singfun problem when testing orthogonality of chebpoly ","user":{"login":"ajt60gaibb","id":1814063,"avatar_url":"https://avatars.githubusercontent.com/u/1814063?v=3","gravatar_id":"","url":"https://api.github.com/users/ajt60gaibb","html_url":"https://github.com/ajt60gaibb","followers_url":"https://api.github.com/users/ajt60gaibb/followers","following_url":"https://api.github.com/users/ajt60gaibb/following{/other_user}","gists_url":"https://api.github.com/users/ajt60gaibb/gists{/gist_id}","starred_url":"https://api.github.com/users/ajt60gaibb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajt60gaibb/subscriptions","organizations_url":"https://api.github.com/users/ajt60gaibb/orgs","repos_url":"https://api.github.com/users/ajt60gaibb/repos","events_url":"https://api.github.com/users/ajt60gaibb/events{/privacy}","received_events_url":"https://api.github.com/users/ajt60gaibb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chebfun/chebfun/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/chebfun/chebfun/labels/high-priority","name":"high-priority","color":"e11d21"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-07-14T18:42:32Z","updated_at":"2015-11-30T18:19:44Z","closed_at":"2015-11-30T18:19:43Z","body":"It seems that Chebyshev polynomials `T_k(x)` are not orthogonal in Chebfun.\r\n\r\n```\r\nx = chebfun( 'x' );\r\nfor k = 1:1000\r\n    v(k+1)=sum( chebpoly(k)./ sqrt(1-x.^2) ); \r\nend\r\nplot(v)\r\n```\r\n![orthogonality](https://cloud.githubusercontent.com/assets/1814063/8681473/8bed06ee-2a35-11e5-8a43-21fd0d2c8afe.png)\r\n\r\nI assume this is an issue in `singfun/sum`. It looks like when `n` is of the form `1+k*32` there can be trouble. Compare \r\n\r\n```\r\nfind(abs(v)>1)\r\nans =\r\n  Columns 1 through 11\r\n     1    33    65    97   129   193   257   289   321   353   385\r\n  Columns 12 through 22\r\n   417   449   481   513   545   577   609   641   673   705   737\r\n  Columns 23 through 30\r\n   769   801   833   865   897   929   961   993\r\n\r\n1+(0:31)*32\r\nans =\r\n  Columns 1 through 11\r\n     1    33    65    97   129   161   193   225   257   289   321\r\n  Columns 12 through 22\r\n   353   385   417   449   481   513   545   577   609   641   673\r\n  Columns 23 through 32\r\n   705   737   769   801   833   865   897   929   961   993\r\n```  "},"comment":{"url":"https://api.github.com/repos/chebfun/chebfun/issues/comments/160712940","html_url":"https://github.com/chebfun/chebfun/issues/1560#issuecomment-160712940","issue_url":"https://api.github.com/repos/chebfun/chebfun/issues/1560","id":160712940,"user":{"login":"bhashemi","id":9217439,"avatar_url":"https://avatars.githubusercontent.com/u/9217439?v=3","gravatar_id":"","url":"https://api.github.com/users/bhashemi","html_url":"https://github.com/bhashemi","followers_url":"https://api.github.com/users/bhashemi/followers","following_url":"https://api.github.com/users/bhashemi/following{/other_user}","gists_url":"https://api.github.com/users/bhashemi/gists{/gist_id}","starred_url":"https://api.github.com/users/bhashemi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhashemi/subscriptions","organizations_url":"https://api.github.com/users/bhashemi/orgs","repos_url":"https://api.github.com/users/bhashemi/repos","events_url":"https://api.github.com/users/bhashemi/events{/privacy}","received_events_url":"https://api.github.com/users/bhashemi/received_events","type":"User","site_admin":false},"created_at":"2015-11-30T18:19:43Z","updated_at":"2015-11-30T18:19:43Z","body":"Yes @aaustin141.  I don't see this problem anymore."}}